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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp

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/DocumentParserTiming.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp b/third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp
index 2909028cd25b30df0350d4b98c0c2a2ba80b0ad5..d48d37a876f9e25c2ec4ad454f32bc329a437290 100644
--- a/third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp
@@ -56,6 +56,17 @@ void DocumentParserTiming::recordParserBlockedOnScriptLoadDuration(
notifyDocumentParserTimingChanged();
}
+void DocumentParserTiming::recordParserBlockedOnScriptExecutionDuration(
+ double duration, bool scriptInsertedViaDocumentWrite)
+{
+ if (m_parserDetached || m_parserStart == 0.0 || m_parserStop > 0.0)
+ return;
+ m_parserBlockedOnScriptExecutionDuration += duration;
+ if (scriptInsertedViaDocumentWrite)
+ m_parserBlockedOnScriptExecutionFromDocumentWriteDuration += duration;
+ notifyDocumentParserTimingChanged();
+}
+
DEFINE_TRACE(DocumentParserTiming)
{
visitor->trace(m_document);

Powered by Google App Engine
This is Rietveld 408576698