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

Unified Diff: content/test/test_webkit_platform_support.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 | « content/test/test_webkit_platform_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_webkit_platform_support.cc
diff --git a/content/test/test_webkit_platform_support.cc b/content/test/test_webkit_platform_support.cc
index 0e9aaf0578b0a88b53937ac49dbd8cf02215e697..a55ebf676bb5e86a8ff3a42533654154bdd75fab 100644
--- a/content/test/test_webkit_platform_support.cc
+++ b/content/test/test_webkit_platform_support.cc
@@ -42,9 +42,16 @@ namespace content {
TestWebKitPlatformSupport::TestWebKitPlatformSupport() {
url_loader_factory_.reset(new WebURLLoaderMockFactory());
mock_clipboard_.reset(new MockWebClipboardImpl());
- v8::V8::SetCounterFunction(base::StatsTable::FindLocation);
+
+ // Create an anonymous stats table since we don't need to share between
+ // processes.
+ stats_table_.reset(
+ new base::StatsTable(base::StatsTable::TableIdentifier(), 20, 200));
+ base::StatsTable::set_current(stats_table_.get());
blink::initialize(this);
+ blink::mainThreadIsolate()->SetCounterFunction(
+ base::StatsTable::FindLocation);
blink::setLayoutTestMode(true);
blink::WebSecurityPolicy::registerURLSchemeAsLocal(
blink::WebString::fromUTF8("test-shell-resource"));
@@ -97,6 +104,8 @@ TestWebKitPlatformSupport::~TestWebKitPlatformSupport() {
url_loader_factory_.reset();
mock_clipboard_.reset();
blink::shutdown();
+ base::StatsTable::set_current(NULL);
+ stats_table_.reset();
}
blink::WebMimeRegistry* TestWebKitPlatformSupport::mimeRegistry() {
« no previous file with comments | « content/test/test_webkit_platform_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698