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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp

Issue 1754213003: Remove code for deprecated and rotted histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
index 63e208b69c2d02d320ddf8f8188fb6680867290a..d7ad4ee0327a330e34f7c8b6b07da0ceb9b51f1c 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -66,13 +66,13 @@ PassOwnPtr<TracedValue> getTraceArgsForScriptElement(Element* element, const Tex
return value.release();
}
-bool doExecuteScript(Element* scriptElement, const ScriptSourceCode& sourceCode, const TextPosition& textPosition, double* compilationFinishTime = nullptr)
+bool doExecuteScript(Element* scriptElement, const ScriptSourceCode& sourceCode, const TextPosition& textPosition)
{
ScriptLoader* scriptLoader = toScriptLoaderIfPossible(scriptElement);
ASSERT(scriptLoader);
TRACE_EVENT_WITH_FLOW1("blink", "HTMLScriptRunner ExecuteScript", scriptElement, TRACE_EVENT_FLAG_FLOW_IN,
"data", getTraceArgsForScriptElement(scriptElement, textPosition));
- return scriptLoader->executeScript(sourceCode, compilationFinishTime);
+ return scriptLoader->executeScript(sourceCode);
}
void traceParserBlockingScript(const PendingScript* pendingScript, bool waitingForResources)
@@ -137,7 +137,6 @@ HTMLScriptRunner::HTMLScriptRunner(Document* document, HTMLScriptRunnerHost* hos
, m_parserBlockingScript(PendingScript::create(nullptr, nullptr))
, m_scriptNestingLevel(0)
, m_hasScriptsWaitingForResources(false)
- , m_parserBlockingScriptAlreadyLoaded(false)
{
ASSERT(m_host);
#if ENABLE(OILPAN)
@@ -189,7 +188,6 @@ void HTMLScriptRunner::executeParsingBlockingScript()
void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript* pendingScript, ScriptStreamer::Type pendingScriptType)
{
bool errorOccurred = false;
- double loadFinishTime = pendingScript->resource() && pendingScript->resource()->url().protocolIsInHTTPFamily() ? pendingScript->resource()->loadFinishTime() : 0;
ScriptSourceCode sourceCode = pendingScript->getSource(documentURLForScriptExecution(m_document), errorOccurred);
// Stop watching loads before executeScript to prevent recursion if the script reloads itself.
@@ -208,7 +206,6 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript* pendi
TextPosition scriptStartPosition = pendingScript->startingPosition();
// Clear the pending script before possible re-entrancy from executeScript()
RefPtrWillBeRawPtr<Element> element = pendingScript->releaseElementAndClear();
- double compilationFinishTime = 0;
if (ScriptLoader* scriptLoader = toScriptLoaderIfPossible(element.get())) {
NestingLevelIncrementer nestingLevelIncrementer(m_scriptNestingLevel);
IgnoreDestructiveWriteCountIncrementer ignoreDestructiveWriteCountIncrementer(m_document);
@@ -218,20 +215,13 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript* pendi
scriptLoader->dispatchErrorEvent();
} else {
ASSERT(isExecutingScript());
- if (!doExecuteScript(element.get(), sourceCode, scriptStartPosition, &compilationFinishTime)) {
+ if (!doExecuteScript(element.get(), sourceCode, scriptStartPosition)) {
scriptLoader->dispatchErrorEvent();
} else {
element->dispatchEvent(Event::create(EventTypeNames::load));
}
}
}
- // The exact value doesn't matter; valid time stamps are much bigger than this value.
- const double epsilon = 1;
- if (pendingScriptType == ScriptStreamer::ParsingBlocking && !m_parserBlockingScriptAlreadyLoaded && compilationFinishTime > epsilon && loadFinishTime > epsilon) {
- int duration = (compilationFinishTime - loadFinishTime) * 1000;
- DEFINE_STATIC_LOCAL(CustomCountHistogram, loadAndCompileHistogram, ("WebCore.Scripts.ParsingBlocking.TimeBetweenLoadedAndCompiled", 0, 10000, 50));
- loadAndCompileHistogram.count(duration);
- }
ASSERT(!isExecutingScript());
}
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698