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

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

Issue 2238543002: Instrument parser blocking script execution time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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.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;
};
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698