Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Unified Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 2737733002: Fix crash in FontFaceSet::ready (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/FontFaceSet.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index 00ecea4a70fc5d2108111c84756b1ae9c97a904c..46edb57de7f6c781cf715999782a5a0f969e92c7 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -243,7 +243,8 @@ void FontFaceSet::removeFromLoadingFonts(FontFace* fontFace) {
}
ScriptPromise FontFaceSet::ready(ScriptState* scriptState) {
- if (m_ready->getState() != ReadyProperty::Pending) {
+ if (m_ready->getState() != ReadyProperty::Pending &&
+ inActiveDocumentContext()) {
// |m_ready| is already resolved, but there may be pending stylesheet
// changes and/or layout operations that may cause another font loads.
// So synchronously update style and layout here.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698