Closed Bug 1465997 Opened 7 years ago Closed 7 years ago

Don't replace FontFaceSet's ready Promise when it's pending

Categories

(Core :: Layout, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

Right now the code in FontFaceSet::DispatchLoadingEventAndReplaceReadyPromise replaced mReady without regard for whether that Promise is resolved or not. That means that if there are any listeners of the replaced Promise, they will be listening to a Promise that is never resolved! Clearly that has the potential to break code.
In fact the only reason that we fail tests like web-platform/tests/css/css-fonts/variations/font-weight-matching.html.ini rather than timing out is because bug 1465983 causes the abandoned Promise to be resolved immediately as soon as it's constructed. (So we need to fix this bug before we can land the fix for bug 1465983.)
Attached patch patchSplinter Review
Attachment #8982375 - Flags: review?(cam)
Blocks: 1465983
Comment on attachment 8982375 [details] [diff] [review] patch Review of attachment 8982375 [details] [diff] [review]: ----------------------------------------------------------------- r=me but if it's possible to add a WPT test for this, can you?
Attachment #8982375 - Flags: review?(cam) → review+
Pushed by jwatt@jwatt.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/b1c533ccce56 Don't replace FontFaceSet's ready Promise when it's pending. r=heycam
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: