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

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

Issue 2238543002: Instrument parser blocking script execution time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 3 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/ScriptRunner.h
diff --git a/third_party/WebKit/Source/core/dom/ScriptRunner.h b/third_party/WebKit/Source/core/dom/ScriptRunner.h
index 6d7201ea4ef5ffcf097dc298bab9f7e31c9b4b35..3bf7b7ec65f1f6c813867a273bd919877c2cbf7c 100644
--- a/third_party/WebKit/Source/core/dom/ScriptRunner.h
+++ b/third_party/WebKit/Source/core/dom/ScriptRunner.h
@@ -48,13 +48,17 @@ public:
return new ScriptRunner(document);
}
- enum ExecutionType { ASYNC_EXECUTION, IN_ORDER_EXECUTION };
- void queueScriptForExecution(ScriptLoader*, ExecutionType);
+ // Async scripts may either execute asynchronously (as their load
+ // completes), or 'in order'. See
+ // http://www.html5rocks.com/en/tutorials/speed/script-loading/ for more
+ // information.
+ enum AsyncExecutionType { None, Async, InOrder };
+ void queueScriptForExecution(ScriptLoader*, AsyncExecutionType);
bool hasPendingScripts() const { return !m_pendingInOrderScripts.isEmpty() || !m_pendingAsyncScripts.isEmpty(); }
void suspend();
void resume();
- void notifyScriptReady(ScriptLoader*, ExecutionType);
- void notifyScriptLoadError(ScriptLoader*, ExecutionType);
+ void notifyScriptReady(ScriptLoader*, AsyncExecutionType);
+ void notifyScriptLoadError(ScriptLoader*, AsyncExecutionType);
static void movePendingScript(Document&, Document&, ScriptLoader*);
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698