Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/ScriptLoader.h |
| diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h |
| index 24f3ebd7e0b67ad6d76412f07751c1a0f73a65fe..b8f3d9533c7c76b1bbbe17e27340650f000104bb 100644 |
| --- a/third_party/WebKit/Source/core/dom/ScriptLoader.h |
| +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h |
| @@ -23,9 +23,11 @@ |
| #include "core/CoreExport.h" |
| #include "core/dom/PendingScript.h" |
| +#include "core/dom/ScriptRunner.h" |
| #include "core/fetch/FetchRequest.h" |
| #include "core/fetch/ResourceClient.h" |
| #include "core/fetch/ScriptResource.h" |
| +#include "wtf/Optional.h" |
| #include "wtf/text/TextPosition.h" |
| #include "wtf/text/WTFString.h" |
| @@ -97,6 +99,7 @@ private: |
| void logScriptMimetype(ScriptResource*, LocalFrame*, String); |
| bool fetchScript(const String& sourceUrl, FetchRequest::DeferOption); |
| + bool doExecuteScript(const ScriptSourceCode&); |
| ScriptLoaderClient* client() const; |
| @@ -116,11 +119,15 @@ private: |
| bool m_haveFiredLoad : 1; |
| bool m_willBeParserExecuted : 1; // Same as "The parser will handle executing the script." |
| bool m_readyToBeParserExecuted : 1; |
| - bool m_willExecuteInOrder : 1; |
| bool m_willExecuteWhenDocumentFinishedParsing : 1; |
| bool m_forceAsync : 1; |
| const bool m_createdDuringDocumentWrite : 1; |
| + // Async scripts may either execute as their load completes, or 'in |
| + // order'. See http://www.html5rocks.com/en/tutorials/speed/script-loading/ |
| + // for more information. |
| + WTF::Optional<ScriptRunner::ExecutionType> m_asyncExecType; |
|
kouhei (in TOK)
2016/08/26 10:01:48
Would you add another ExecutionType instead of WTF
Bryan McQuade
2016/08/28 21:09:23
Sure. I also renamed the enum to AsyncExecutionTyp
|
| + |
| Member<PendingScript> m_pendingScript; |
| }; |