Repository navigation
Commit fae21d3
Don't keep paragraph content with attachments across clones
Attachments hold raw pointers to the children the content was built
from, and layout() replaces those children with laid-out clones. A clone
that kept that content pointed at nodes only the previous revision still
owned, and once that revision was released, layout() read freed memory
and crashed in ParagraphShadowNode::layout. Only keep content that has no
attachments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 70f59c1 commit fae21d3
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
70 | | - | |
71 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
0 commit comments