| Index: Source/core/html/parser/HTMLScriptRunner.cpp
|
| diff --git a/Source/core/html/parser/HTMLScriptRunner.cpp b/Source/core/html/parser/HTMLScriptRunner.cpp
|
| index c16d06a1fbb413d501abf0206158d9cca8a4e80f..3e3a7d0153da82f4e64dfb516d19bfc712fa8eb5 100644
|
| --- a/Source/core/html/parser/HTMLScriptRunner.cpp
|
| +++ b/Source/core/html/parser/HTMLScriptRunner.cpp
|
| @@ -125,8 +125,12 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
|
| if (pendingScript.resource() && pendingScript.watchingForLoad())
|
| stopWatchingForLoad(pendingScript);
|
|
|
| - if (!isExecutingScript())
|
| + if (!isExecutingScript()) {
|
| Microtask::performCheckpoint();
|
| + m_hasScriptsWaitingForResources = !m_document->haveStylesheetsAndImportsLoaded();
|
| + if (m_hasScriptsWaitingForResources)
|
| + return;
|
| + }
|
|
|
| // Clear the pending script before possible rentrancy from executeScript()
|
| RefPtr<Element> element = pendingScript.releaseElementAndClear();
|
|
|