Closed Bug 380451 Opened 17 years ago Closed 17 years ago

Store hashcode in textrun to avoid accessing deleted text

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file)

When nsTextFrameThebes uses TEXT_IS_PERSISTENT to avoid maintaining a separate copy of DOM text in the textrun, we have a problem when the DOM text changes. We need to destroy the textrun and remove it from the cache, but gfxTextRunCache::RemoveTextRun needs the hashcode of the text to find the entry to remove, but the text is already gone so we get the wrong hashcode or we crash on invalid memory.
Attached patch fixSplinter Review
We can't remove the textrun before the text changes, because there is no DOM notification for that (and adding one could be costly). So instead I just store the hashcode in the textrun so we can always get it and find the hash entry for the textrun.
Attachment #264535 - Flags: review?(vladimir)
checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: