Closed Bug 1364465 Opened 7 years ago Closed 7 years ago

Shaped-word caches in gfxFont instances should use fallible allocation

Categories

(Core :: Graphics: Text, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

The shaped-word cache attached to each gfxFont instance was originally intended to use fallible allocation when adding words, so that in the event of allocation failure we'd fail "softly" (missing text) rather than aborting. Hence, it explicitly checks for failure when trying to add a new entry to the cache:

https://dxr.mozilla.org/mozilla-central/rev/8a7d0b15595f9916123848ca906f29c62d4914c9/gfx/thebes/gfxFont.cpp#2592-2596

However, the hashtable it's using is now infallible by default, so to get the intended behavior we should add the 'fallible' parameter.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8867235 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9ae77f67a673945cc08b80b0cce36a66707d867
Bug 1364465 - Make shaped-word caches in gfxFont instances use fallible allocation, for a less drastic failure mode in the event of allocation failure. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/e9ae77f67a67
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: