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

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

Issue 1857903002: Record parser blocking time for scripts inserted via doc.write (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 19c489f3f78b68295127f99d6f677e4eb82b546c..f02c037aad9678e7a3087dc84c8df031ad310193 100644
--- a/third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentParserTiming.cpp
@@ -46,11 +46,14 @@ void DocumentParserTiming::markParserDetached()
m_parserDetached = true;
}
-void DocumentParserTiming::recordParserBlockedOnScriptLoadDuration(double duration)
+void DocumentParserTiming::recordParserBlockedOnScriptLoadDuration(
+ double duration, bool scriptInsertedViaDocumentWrite)
{
if (m_parserDetached || m_parserStart == 0.0 || m_parserStop > 0.0)
return;
m_parserBlockedOnScriptLoadDuration += duration;
+ if (scriptInsertedViaDocumentWrite)
+ m_parserBlockedOnScriptLoadFromDocumentWriteDuration += duration;
notifyDocumentParserTimingChanged();
}

Powered by Google App Engine
This is Rietveld 408576698