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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 370973004: Update V8 histogram/counter API usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 5 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 | « chrome/test/base/chrome_unit_test_suite.cc ('k') | content/test/test_webkit_platform_support.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index c7ea9c71e78c6fcd3727d6326465f816285e075e..266663abec226897c32c3ffb185f8cda61d84067 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -331,7 +331,7 @@ void RenderThreadImpl::HistogramCustomizer::SetCommonHost(
if (host != common_host_) {
common_host_ = host;
common_host_histogram_suffix_ = HostToCustomHistogramSuffix(host);
- v8::V8::SetCreateHistogramFunction(CreateHistogram);
+ blink::mainThreadIsolate()->SetCreateHistogramFunction(CreateHistogram);
}
}
@@ -357,10 +357,6 @@ void RenderThreadImpl::Init() {
base::PlatformThread::CurrentId(),
kTraceEventRendererMainThreadSortIndex);
- v8::V8::SetCounterFunction(base::StatsTable::FindLocation);
- v8::V8::SetCreateHistogramFunction(CreateHistogram);
- v8::V8::SetAddHistogramSampleFunction(AddHistogramSample);
-
#if defined(OS_MACOSX) || defined(OS_ANDROID)
// On Mac and Android, the select popups are rendered by the browser.
blink::WebView::setUseExternalPopupMenus(true);
@@ -791,6 +787,12 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl);
blink::initialize(webkit_platform_support_.get());
+ v8::Isolate* isolate = blink::mainThreadIsolate();
+
+ isolate->SetCounterFunction(base::StatsTable::FindLocation);
+ isolate->SetCreateHistogramFunction(CreateHistogram);
+ isolate->SetAddHistogramSampleFunction(AddHistogramSample);
+
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing);
« no previous file with comments | « chrome/test/base/chrome_unit_test_suite.cc ('k') | content/test/test_webkit_platform_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698