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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp

Issue 2796653003: Move ScriptState::forWorld/ScriptState::forMainWorld (Part 2) (Closed)
Patch Set: Rebase Created 3 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
Index: third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
index 379e5f18c13ca9c3082e3716f3dc3b0de7df1e82..552799c02c09e3fd9aa4fe7cf57efc5b01220820 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
@@ -25,8 +25,11 @@
#include "core/html/parser/HTMLParserScriptRunner.h"
+#include <inttypes.h>
+#include <memory>
#include "bindings/core/v8/Microtask.h"
#include "bindings/core/v8/ScriptSourceCode.h"
+#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8PerIsolateData.h"
#include "core/dom/DocumentParserTiming.h"
#include "core/dom/Element.h"
@@ -46,8 +49,6 @@
#include "platform/instrumentation/tracing/TracedValue.h"
#include "platform/loader/fetch/MemoryCache.h"
#include "public/platform/Platform.h"
-#include <inttypes.h>
-#include <memory>
namespace blink {
@@ -554,7 +555,7 @@ void HTMLParserScriptRunner::requestParsingBlockingScript(Element* element) {
// returning control to the parser.
if (!parserBlockingScript()->isReady()) {
if (m_document->frame()) {
- ScriptState* scriptState = ScriptState::forMainWorld(m_document->frame());
+ ScriptState* scriptState = toScriptStateForMainWorld(m_document->frame());
if (scriptState) {
ScriptStreamer::startStreaming(
m_parserBlockingScript, ScriptStreamer::ParsingBlocking,
@@ -574,7 +575,7 @@ void HTMLParserScriptRunner::requestDeferredScript(Element* element) {
return;
if (m_document->frame() && !pendingScript->isReady()) {
- ScriptState* scriptState = ScriptState::forMainWorld(m_document->frame());
+ ScriptState* scriptState = toScriptStateForMainWorld(m_document->frame());
if (scriptState) {
ScriptStreamer::startStreaming(
pendingScript, ScriptStreamer::Deferred,

Powered by Google App Engine
This is Rietveld 408576698