| Index: third_party/WebKit/Source/core/dom/DocumentParserTiming.h
|
| diff --git a/third_party/WebKit/Source/core/dom/DocumentParserTiming.h b/third_party/WebKit/Source/core/dom/DocumentParserTiming.h
|
| index 6a2134ee38233c4dea9d13ca6db8c208235c6123..80bd3254fa16d7b0c12b12ab3e96d73cee147eaf 100644
|
| --- a/third_party/WebKit/Source/core/dom/DocumentParserTiming.h
|
| +++ b/third_party/WebKit/Source/core/dom/DocumentParserTiming.h
|
| @@ -44,9 +44,12 @@ public:
|
| void markParserDetached();
|
|
|
| // Record a duration of time that the parser yielded due to loading a
|
| - // script, in seconds. This may be called multiple times, once for each time
|
| - // the parser yields on a script load.
|
| - void recordParserBlockedOnScriptLoadDuration(double duration);
|
| + // script, in seconds. scriptInsertedViaDocumentWrite indicates whether the
|
| + // script causing blocking was inserted via document.write. This may be
|
| + // called multiple times, once for each time the parser yields on a script
|
| + // load.
|
| + void recordParserBlockedOnScriptLoadDuration(
|
| + double duration, bool scriptInsertedViaDocumentWrite);
|
|
|
| // The getters below return monotonically-increasing seconds, or zero if the
|
| // given parser event has not yet occurred. See the comments for
|
| @@ -59,6 +62,10 @@ public:
|
| // recordParseBlockedOnScriptLoadDuration.
|
| double parserBlockedOnScriptLoadDuration() const { return m_parserBlockedOnScriptLoadDuration; }
|
|
|
| + // Returns the sum of all blocking script load durations due to
|
| + // document.write reported via recordParseBlockedOnScriptLoadDuration.
|
| + double parserBlockedOnScriptLoadDueToDocumentWriteDuration() const { return m_parserBlockedOnScriptLoadDueToDocumentWriteDuration; }
|
| +
|
| DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
| @@ -68,6 +75,7 @@ private:
|
| double m_parserStart = 0.0;
|
| double m_parserStop = 0.0;
|
| double m_parserBlockedOnScriptLoadDuration = 0.0;
|
| + double m_parserBlockedOnScriptLoadDueToDocumentWriteDuration = 0.0;
|
| bool m_parserDetached = false;
|
|
|
| Member<Document> m_document;
|
|
|