| Index: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
|
| diff --git a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
|
| index 938c9ee41e64d5d563ea4f285b2c4f386ce911a5..2c251c8f12684b1a79b4d212d9230666bb6436a0 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
|
| +++ b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
|
| @@ -64,6 +64,9 @@
|
| const TextPosition& scriptStartPosition);
|
|
|
| void executeScriptsWaitingForLoad(Resource*);
|
| + bool hasScriptsWaitingForResources() const {
|
| + return m_hasScriptsWaitingForResources;
|
| + }
|
| void executeScriptsWaitingForResources();
|
| bool executeScriptsWaitingForParsing();
|
|
|
| @@ -92,7 +95,7 @@
|
|
|
| void runScript(Element*, const TextPosition& scriptStartPosition);
|
|
|
| - bool isPendingScriptReady();
|
| + bool isPendingScriptReady(const PendingScript*);
|
|
|
| void stopWatchingResourceForLoad(Resource*);
|
|
|
| @@ -104,6 +107,12 @@
|
| Member<PendingScript> m_parserBlockingScript;
|
| // http://www.whatwg.org/specs/web-apps/current-work/#list-of-scripts-that-will-execute-when-the-document-has-finished-parsing
|
| HeapDeque<Member<PendingScript>> m_scriptsToExecuteAfterParsing;
|
| +
|
| + // We only want stylesheet loads to trigger script execution if script
|
| + // execution is currently stopped due to stylesheet loads, otherwise we'd
|
| + // cause nested script execution when parsing <style> tags since </style>
|
| + // tags can cause Document to call executeScriptsWaitingForResources.
|
| + bool m_hasScriptsWaitingForResources;
|
| };
|
|
|
| } // namespace blink
|
|
|