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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_resolver_v8.h ('k') | webkit/glue/webkit_glue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/proxy/proxy_resolver_v8.h" 5 #include "net/proxy/proxy_resolver_v8.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdio> 8 #include <cstdio>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 // static 730 // static
731 v8::Isolate* ProxyResolverV8::GetDefaultIsolate() { 731 v8::Isolate* ProxyResolverV8::GetDefaultIsolate() {
732 DCHECK(g_default_isolate_) 732 DCHECK(g_default_isolate_)
733 << "Must call ProxyResolverV8::RememberDefaultIsolate() first"; 733 << "Must call ProxyResolverV8::RememberDefaultIsolate() first";
734 return g_default_isolate_; 734 return g_default_isolate_;
735 } 735 }
736 736
737 v8::Isolate* ProxyResolverV8::g_default_isolate_ = NULL; 737 v8::Isolate* ProxyResolverV8::g_default_isolate_ = NULL;
738 738
739 // static
740 size_t ProxyResolverV8::GetTotalHeapSize() {
741 if (!g_default_isolate_)
742 return 0;
743
744 v8::Locker locked(g_default_isolate_);
745 v8::HeapStatistics heap_statistics;
746 g_default_isolate_->GetHeapStatistics(&heap_statistics);
747 return heap_statistics.total_heap_size();
748 }
749
750 // static
751 size_t ProxyResolverV8::GetUsedHeapSize() {
752 if (!g_default_isolate_)
753 return 0;
754
755 v8::Locker locked(g_default_isolate_);
756 v8::HeapStatistics heap_statistics;
757 g_default_isolate_->GetHeapStatistics(&heap_statistics);
758 return heap_statistics.used_heap_size();
759 }
760
739 } // namespace net 761 } // namespace net
OLDNEW
« 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