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

Unified Diff: net/proxy/proxy_service_v8.cc

Issue 11959029: Make the v8 Isolate used in the proxy resolver explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed component build Created 7 years, 11 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
« net/proxy/proxy_resolver_v8.cc ('K') | « net/proxy/proxy_service_v8.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service_v8.cc
diff --git a/net/proxy/proxy_service_v8.cc b/net/proxy/proxy_service_v8.cc
index 44ae82c3554c900e6b2df9438e27eab50339b12b..66247d820e11d99b45d54098d2d61d1619e35135 100644
--- a/net/proxy/proxy_service_v8.cc
+++ b/net/proxy/proxy_service_v8.cc
@@ -27,13 +27,15 @@ class ProxyResolverFactoryForV8 : public ProxyResolverFactory {
MessageLoop* io_loop,
base::MessageLoopProxy* origin_loop,
NetLog* net_log,
- NetworkDelegate* network_delegate)
+ NetworkDelegate* network_delegate,
+ v8::Isolate* v8_default_isolate)
: ProxyResolverFactory(true /*expects_pac_bytes*/),
async_host_resolver_(async_host_resolver),
io_loop_(io_loop),
origin_loop_(origin_loop),
net_log_(net_log),
- network_delegate_(network_delegate) {
+ network_delegate_(network_delegate),
+ v8_default_isolate_(v8_default_isolate) {
}
virtual ProxyResolver* CreateProxyResolver() OVERRIDE {
@@ -53,7 +55,7 @@ class ProxyResolverFactoryForV8 : public ProxyResolverFactory {
sync_host_resolver, net_log_, error_observer);
// ProxyResolverV8 takes ownership of |js_bindings|.
- return new ProxyResolverV8(js_bindings);
+ return new ProxyResolverV8(js_bindings, v8_default_isolate_);
}
private:
@@ -62,6 +64,7 @@ class ProxyResolverFactoryForV8 : public ProxyResolverFactory {
scoped_refptr<base::MessageLoopProxy> origin_loop_;
NetLog* net_log_;
NetworkDelegate* network_delegate_;
+ v8::Isolate* v8_default_isolate_;
};
} // namespace
@@ -74,11 +77,13 @@ ProxyService* CreateProxyServiceUsingV8ProxyResolver(
DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher,
HostResolver* host_resolver,
NetLog* net_log,
- NetworkDelegate* network_delegate) {
+ NetworkDelegate* network_delegate,
+ v8::Isolate* v8_default_isolate) {
DCHECK(proxy_config_service);
DCHECK(proxy_script_fetcher);
DCHECK(dhcp_proxy_script_fetcher);
DCHECK(host_resolver);
+ DCHECK(v8_default_isolate);
if (num_pac_threads == 0)
num_pac_threads = ProxyService::kDefaultNumPacThreads;
@@ -89,7 +94,8 @@ ProxyService* CreateProxyServiceUsingV8ProxyResolver(
MessageLoop::current(),
base::MessageLoopProxy::current(),
net_log,
- network_delegate);
+ network_delegate,
+ v8_default_isolate);
ProxyResolver* proxy_resolver =
new MultiThreadedProxyResolver(sync_resolver_factory, num_pac_threads);
« net/proxy/proxy_resolver_v8.cc ('K') | « net/proxy/proxy_service_v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698