Chromium Code Reviews| 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 eb0cc5608fc6e02c902f86038dfdfc1ec58adfac..623dd6a86a2e01996e000812c396400e8c168ce0 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_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, clearForCloseHistogram, new CustomCountHistogram("WebCore.ScriptController.clearForClose", 0, 10000, 50)); |
|
esprehn
2016/02/04 23:25:23
this doesn't need to be thread safe, ScriptControl
|
| + 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_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, clearWindowProxyHistogram, new CustomCountHistogram("WebCore.ScriptController.clearWindowProxy", 0, 10000, 50)); |
|
esprehn
2016/02/04 23:25:23
ditto
|
| + clearWindowProxyHistogram.count((end - start) * 1000); |
| } |
| void ScriptController::setCaptureCallStackForUncaughtExceptions(v8::Isolate* isolate, bool value) |