Bug 1466431 - Fix resolving of the document.fonts.ready Promise for documents that never load fonts. r=heycam

This commit is contained in:
Jonathan Watt 2018-05-18 12:45:18 +01:00
parent 28123a9dcb
commit 6d4c239fd8

View File

@ -1768,9 +1768,10 @@ FontFaceSet::CheckLoadingFinished()
return;
}
if (mStatus == FontFaceSetLoadStatus::Loaded) {
// We've already resolved mReady and dispatched the loadingdone/loadingerror
// events.
if ((mReady && mReady->State() != Promise::PromiseState::Pending) ||
mResolveLazilyCreatedReadyPromise) {
// We've already resolved mReady (or set the flag to do that lazily) and
// dispatched the loadingdone/loadingerror events.
return;
}