Repository navigation
Commit 97af53f
committed
CFAttributedString: keep attribute coalescing within the run array
CFAttributedStringSetAttributes passed the last touched run index to
CFAttributedStringCoalesce as the length of the range to coalesce, so the
scan could run past the end of the attribute array, comparing and then
uncaching runs that were never allocated. That freed an attribute
dictionary still referenced by a live run and later faulted when the run
was uncached again. The coalesce scan now stops at the current run count.
While here, refresh the local array pointer after an insertion that may
reallocate the run array, and correct the run-removal shift, which stopped
one element short and dropped the last run.1 parent 90822ff commit 97af53f
1 file changed
Lines changed: 17 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
| 543 | + | |
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | 575 | | |
586 | 576 | | |
587 | 577 | | |
588 | 578 | | |
| 579 | + | |
| 580 | + | |
589 | 581 | | |
590 | 582 | | |
591 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
592 | 587 | | |
593 | 588 | | |
| 589 | + | |
| 590 | + | |
594 | 591 | | |
595 | 592 | | |
596 | 593 | | |
597 | | - | |
| 594 | + | |
| 595 | + | |
598 | 596 | | |
599 | 597 | | |
600 | 598 | | |
| |||
792 | 790 | | |
793 | 791 | | |
794 | 792 | | |
795 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
796 | 799 | | |
797 | 800 | | |
798 | 801 | | |
| |||
809 | 812 | | |
810 | 813 | | |
811 | 814 | | |
| 815 | + | |
812 | 816 | | |
813 | 817 | | |
814 | 818 | | |
| |||
0 commit comments