| 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 552799c02c09e3fd9aa4fe7cf57efc5b01220820..fd9dc6b0af93b06af321a14edadf65b9338a2079 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
|
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
|
| @@ -554,16 +554,8 @@ void HTMLParserScriptRunner::requestParsingBlockingScript(Element* element) {
|
| // Callers will attempt to run the m_parserBlockingScript if possible before
|
| // returning control to the parser.
|
| if (!parserBlockingScript()->isReady()) {
|
| - if (m_document->frame()) {
|
| - ScriptState* scriptState = toScriptStateForMainWorld(m_document->frame());
|
| - if (scriptState) {
|
| - ScriptStreamer::startStreaming(
|
| - m_parserBlockingScript, ScriptStreamer::ParsingBlocking,
|
| - m_document->frame()->settings(), scriptState,
|
| - TaskRunnerHelper::get(TaskType::Networking, m_document));
|
| - }
|
| - }
|
| -
|
| + m_parserBlockingScript->startStreamingIfPossible(
|
| + m_document, ScriptStreamer::ParsingBlocking);
|
| m_parserBlockingScript->watchForLoad(this);
|
| }
|
| }
|
| @@ -574,14 +566,9 @@ void HTMLParserScriptRunner::requestDeferredScript(Element* element) {
|
| if (!pendingScript)
|
| return;
|
|
|
| - if (m_document->frame() && !pendingScript->isReady()) {
|
| - ScriptState* scriptState = toScriptStateForMainWorld(m_document->frame());
|
| - if (scriptState) {
|
| - ScriptStreamer::startStreaming(
|
| - pendingScript, ScriptStreamer::Deferred,
|
| - m_document->frame()->settings(), scriptState,
|
| - TaskRunnerHelper::get(TaskType::Networking, m_document));
|
| - }
|
| + if (!pendingScript->isReady()) {
|
| + pendingScript->startStreamingIfPossible(m_document,
|
| + ScriptStreamer::Deferred);
|
| }
|
|
|
| DCHECK(pendingScript->resource());
|
|
|