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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 1659053002: Remove custom counts histogram from the blink API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few thread_safe_static_local -> static_local as per feedback in reviews 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 | « content/child/blink_platform_impl.cc ('k') | third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
index f2d50266ad729b2e7fe10864116fcf49d8c8e772..6ca4b800d501872797a45bed5623abb75f9eebfd 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -68,6 +68,7 @@
#include "core/loader/NavigationScheduler.h"
#include "core/loader/ProgressTracker.h"
#include "core/plugins/PluginView.h"
+#include "platform/Histogram.h"
#include "platform/NotImplemented.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
@@ -134,7 +135,9 @@ void ScriptController::clearForClose()
{
double start = currentTime();
m_windowProxyManager->clearForClose();
- Platform::current()->histogramCustomCounts("WebCore.ScriptController.clearForClose", (currentTime() - start) * 1000, 0, 10000, 50);
+ double end = currentTime();
+ DEFINE_STATIC_LOCAL(CustomCountHistogram, clearForCloseHistogram, ("WebCore.ScriptController.clearForClose", 0, 10000, 50));
+ clearForCloseHistogram.count((end - start) * 1000);
}
void ScriptController::updateSecurityOrigin(SecurityOrigin* origin)
@@ -410,7 +413,9 @@ void ScriptController::clearWindowProxy()
clearScriptObjects();
m_windowProxyManager->clearForNavigation();
- Platform::current()->histogramCustomCounts("WebCore.ScriptController.clearWindowProxy", (currentTime() - start) * 1000, 0, 10000, 50);
+ double end = currentTime();
+ DEFINE_STATIC_LOCAL(CustomCountHistogram, clearWindowProxyHistogram, ("WebCore.ScriptController.clearWindowProxy", 0, 10000, 50));
+ clearWindowProxyHistogram.count((end - start) * 1000);
}
void ScriptController::setCaptureCallStackForUncaughtExceptions(v8::Isolate* isolate, bool value)
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698