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

Side by Side Diff: net/proxy/proxy_resolver_v8.cc

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk Created 7 years, 6 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_config_service_linux.cc ('k') | net/proxy/proxy_resolver_v8_tracing.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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 NOTREACHED(); 703 NOTREACHED();
704 } 704 }
705 705
706 void ProxyResolverV8::PurgeMemory() { 706 void ProxyResolverV8::PurgeMemory() {
707 context_->PurgeMemory(); 707 context_->PurgeMemory();
708 } 708 }
709 709
710 int ProxyResolverV8::SetPacScript( 710 int ProxyResolverV8::SetPacScript(
711 const scoped_refptr<ProxyResolverScriptData>& script_data, 711 const scoped_refptr<ProxyResolverScriptData>& script_data,
712 const CompletionCallback& /*callback*/) { 712 const CompletionCallback& /*callback*/) {
713 DCHECK(script_data); 713 DCHECK(script_data.get());
714 DCHECK(js_bindings_); 714 DCHECK(js_bindings_);
715 715
716 context_.reset(); 716 context_.reset();
717 if (script_data->utf16().empty()) 717 if (script_data->utf16().empty())
718 return ERR_PAC_SCRIPT_FAILED; 718 return ERR_PAC_SCRIPT_FAILED;
719 719
720 // Try parsing the PAC script. 720 // Try parsing the PAC script.
721 scoped_ptr<Context> context(new Context(this, GetDefaultIsolate())); 721 scoped_ptr<Context> context(new Context(this, GetDefaultIsolate()));
722 int rv = context->InitV8(script_data); 722 int rv = context->InitV8(script_data);
723 if (rv == OK) 723 if (rv == OK)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 if (!g_default_isolate_) 760 if (!g_default_isolate_)
761 return 0; 761 return 0;
762 762
763 v8::Locker locked(g_default_isolate_); 763 v8::Locker locked(g_default_isolate_);
764 v8::HeapStatistics heap_statistics; 764 v8::HeapStatistics heap_statistics;
765 g_default_isolate_->GetHeapStatistics(&heap_statistics); 765 g_default_isolate_->GetHeapStatistics(&heap_statistics);
766 return heap_statistics.used_heap_size(); 766 return heap_statistics.used_heap_size();
767 } 767 }
768 768
769 } // namespace net 769 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/proxy/proxy_resolver_v8_tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698