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

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: fix test 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..4e45ae2d4ece064e4398f4541909d1e0b5999a98 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -23,6 +23,7 @@
#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"
@@ -97,6 +98,7 @@ private:
void logScriptMimetype(ScriptResource*, LocalFrame*, String);
bool fetchScript(const String& sourceUrl, FetchRequest::DeferOption);
+ bool doExecuteScript(const ScriptSourceCode&);
ScriptLoaderClient* client() const;
@@ -116,11 +118,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.
+ ScriptRunner::AsyncExecutionType m_asyncExecType;
+
Member<PendingScript> m_pendingScript;
};

Powered by Google App Engine
This is Rietveld 408576698