diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-12 09:20:20 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-12 09:20:20 +0000 |
commit | c7e948b4578d55a52199adad9f38e73f70fe7a28 (patch) | |
tree | c8e891a9926d4f8767a70977efa691b31be64b6e /content/renderer/render_thread_impl.cc | |
parent | 5eaf2ff711a73a8e88a90a91747b19e13d8b9d60 (diff) | |
download | chromium_src-c7e948b4578d55a52199adad9f38e73f70fe7a28.zip chromium_src-c7e948b4578d55a52199adad9f38e73f70fe7a28.tar.gz chromium_src-c7e948b4578d55a52199adad9f38e73f70fe7a28.tar.bz2 |
Fix stats counters
- intialize the V8 callbacks first thing, otherwise, the counters disable themselves
- don't use inline event handlers in the presence of a CSP
- on linux, the child processes need to use the parent's parent pid to derive the table name (the parent is the zygote, the parent's parent is the browser)
BUG=none
TEST=run chrome with --enable-stats-table, you should see lots of V8 stats, and you should be able to filter for e.g. V8
Review URL: https://chromiumcodereview.appspot.com/10690137
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_thread_impl.cc')
-rw-r--r-- | content/renderer/render_thread_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index d1108ad..afbf45f 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -185,6 +185,10 @@ RenderThreadImpl::RenderThreadImpl(const std::string& channel_name) void RenderThreadImpl::Init() { TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, ""); + 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. WebKit::WebView::setUseExternalPopupMenus(true); @@ -481,10 +485,6 @@ void RenderThreadImpl::EnsureWebKitInitialized() { if (webkit_platform_support_.get()) return; - v8::V8::SetCounterFunction(base::StatsTable::FindLocation); - v8::V8::SetCreateHistogramFunction(CreateHistogram); - v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); - webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); WebKit::initialize(webkit_platform_support_.get()); |