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

Unified Diff: net/proxy/proxy_resolver_v8.cc

Issue 12398007: Replaced deprecated v8 API calls by their non-deprecated counterparts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « net/proxy/proxy_resolver_v8.h ('k') | webkit/glue/webkit_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_v8.cc
diff --git a/net/proxy/proxy_resolver_v8.cc b/net/proxy/proxy_resolver_v8.cc
index c28dead6ce0036505a94ae9b0930bad937c497d1..2620252e65d33d862afe5905173716a6d168ce27 100644
--- a/net/proxy/proxy_resolver_v8.cc
+++ b/net/proxy/proxy_resolver_v8.cc
@@ -736,4 +736,26 @@ v8::Isolate* ProxyResolverV8::GetDefaultIsolate() {
v8::Isolate* ProxyResolverV8::g_default_isolate_ = NULL;
+// static
+size_t ProxyResolverV8::GetTotalHeapSize() {
+ if (!g_default_isolate_)
+ return 0;
+
+ v8::Locker locked(g_default_isolate_);
+ v8::HeapStatistics heap_statistics;
+ g_default_isolate_->GetHeapStatistics(&heap_statistics);
+ return heap_statistics.total_heap_size();
+}
+
+// static
+size_t ProxyResolverV8::GetUsedHeapSize() {
+ if (!g_default_isolate_)
+ return 0;
+
+ v8::Locker locked(g_default_isolate_);
+ v8::HeapStatistics heap_statistics;
+ g_default_isolate_->GetHeapStatistics(&heap_statistics);
+ return heap_statistics.used_heap_size();
+}
+
} // namespace net
« no previous file with comments | « net/proxy/proxy_resolver_v8.h ('k') | webkit/glue/webkit_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698