Index: third_party/WebKit/Source/core/css/FontFace.cpp |
diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp |
index f199686ac84782f0a69d487cd8a31fb09e8d7d5d..2d695fb7ee5ae54eb375ba1103938edbe85116b5 100644 |
--- a/third_party/WebKit/Source/core/css/FontFace.cpp |
+++ b/third_party/WebKit/Source/core/css/FontFace.cpp |
@@ -388,13 +388,14 @@ ScriptPromise FontFace::fontStatusPromise(ScriptState* scriptState) { |
} |
ScriptPromise FontFace::load(ScriptState* scriptState) { |
- loadInternal(scriptState->getExecutionContext()); |
+ if (m_status == Unloaded) |
+ m_cssFontFace->load(); |
return fontStatusPromise(scriptState); |
} |
-void FontFace::loadWithCallback(LoadFontCallback* callback, |
- ExecutionContext* context) { |
- loadInternal(context); |
+void FontFace::loadWithCallback(LoadFontCallback* callback) { |
+ if (m_status == Unloaded) |
+ m_cssFontFace->load(); |
addCallback(callback); |
} |
@@ -407,13 +408,6 @@ void FontFace::addCallback(LoadFontCallback* callback) { |
m_callbacks.push_back(callback); |
} |
-void FontFace::loadInternal(ExecutionContext* context) { |
- if (m_status != Unloaded) |
- return; |
- |
- m_cssFontFace->load(); |
-} |
- |
FontTraits FontFace::traits() const { |
FontStretch stretch = FontStretchNormal; |
if (m_stretch) { |