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

Unified Diff: Source/core/css/FontFace.cpp

Issue 236123007: Use ScriptPromiseResolverWithContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index ab6bc613368000a626e88a86c022cae00455b638..f7c1fb6e0f923a4e6af4f6d2b0be2706b1aa0876 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -36,7 +36,7 @@
#include "bindings/v8/Dictionary.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/NewScriptState.h"
-#include "bindings/v8/ScriptPromiseResolver.h"
+#include "bindings/v8/ScriptPromiseResolverWithContext.h"
#include "core/css/BinaryDataFontFaceSource.h"
#include "core/css/CSSFontFace.h"
#include "core/css/CSSFontFaceSrcValue.h"
@@ -72,7 +72,6 @@ public:
void resolve(PassRefPtr<FontFace> fontFace)
{
- NewScriptState::Scope scope(m_scriptState.get());
switch (fontFace->loadStatus()) {
case FontFace::Loaded:
m_resolver->resolve(fontFace);
@@ -89,13 +88,11 @@ public:
private:
FontFaceReadyPromiseResolver(ExecutionContext* context)
- : m_scriptState(NewScriptState::current(toIsolate(context)))
- , m_resolver(ScriptPromiseResolver::create(context))
+ : m_resolver(ScriptPromiseResolverWithContext::create(NewScriptState::current(toIsolate(context))))
{
}
- RefPtr<NewScriptState> m_scriptState;
- RefPtr<ScriptPromiseResolver> m_resolver;
+ RefPtr<ScriptPromiseResolverWithContext> m_resolver;
};
static PassRefPtrWillBeRawPtr<CSSValue> parseCSSValue(const Document* document, const String& s, CSSPropertyID propertyID)
« no previous file with comments | « no previous file | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698