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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Issue 2800683005: Introduce PendingScript::startStreamingIfPossible() (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/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index fa913b355e0b6a734d61aa8b23ba618d11345793..5270e0c807c9e37502572daf58a986c2c2377d07 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -458,14 +458,8 @@ bool ScriptLoader::prepareScript(const TextPosition& scriptStartPosition,
// time the prepare a script algorithm started."
m_pendingScript = PendingScript::create(m_element.get(), m_resource.get());
m_asyncExecType = ScriptRunner::Async;
- LocalFrame* frame = m_element->document().frame();
- if (frame) {
- ScriptState* scriptState = toScriptStateForMainWorld(frame);
- if (scriptState)
- ScriptStreamer::startStreaming(
- m_pendingScript.get(), ScriptStreamer::Async, frame->settings(),
- scriptState, frame->frameScheduler()->loadingTaskRunner());
- }
+ m_pendingScript->startStreamingIfPossible(&m_element->document(),
+ ScriptStreamer::Async);
// TODO(hiroshige): Here |contextDocument| is used as "node document"
// while Step 14 uses |elementDocument| as "node document". Fix this.
contextDocument->scriptRunner()->queueScriptForExecution(this,

Powered by Google App Engine
This is Rietveld 408576698