Closed Bug 910376 Opened 11 years ago Closed 11 years ago

Should FontTableHashEntry copy mSharedBlobData and/or initialize mSharedBlobData to null?

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: justin.lebar+bug, Assigned: jfkthame)

References

Details

Attachments

(1 file, 1 obsolete file)

I'd normally ask about this on IRC, but the relevant people don't seem to be around at the moment. I noticed that FontTableHashEntry's copy constructor doesn't copy mSharedBlobData. This seems odd to me, because it means that if the hashtable is mutated, mSharedBlobData will be undefined. Similarly, mSharedBlobData is not initialized to null in the default FontTableHashEntry constructor, so I don't see how the |if (mSharedBlobData)| check in gfxFontEntry::FontTableHashEntry::Clear() and in SizeOfEntryExcludingThis() is sensible. OTOH this code is doing something clever with the hashtable that I don't grok, so maybe this is all right.
Thanks, Justin - this sure looks suspicious to me. I wonder if it might lie behind some of the unexplained font-related crashes we've seen over the past months, in bugs such as 875878 and 894798.
Attachment #798216 - Flags: review?(karlt)
Assignee: nobody → jfkthame
Oops... initializers were in the wrong order. Fixed that.
Attachment #798222 - Flags: review?(karlt)
Attachment #798216 - Attachment is obsolete: true
Attachment #798216 - Flags: review?(karlt)
Attachment #798222 - Flags: review?(karlt) → review+
Blocks: 605872
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: