Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index 3740513eb525545e55c466265a32dee3f95f1576..47dfc6251c51e30c573976e5b0e1bf5b04deef49 100644 |
--- a/chrome/browser/io_thread.cc |
+++ b/chrome/browser/io_thread.cc |
@@ -61,6 +61,7 @@ |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_request_throttler_manager.h" |
#include "net/websockets/websocket_job.h" |
+#include "v8/include/v8.h" |
#if defined(ENABLE_CONFIGURATION_POLICY) |
#include "policy/policy_constants.h" |
@@ -366,7 +367,10 @@ IOThread::IOThread( |
globals_(NULL), |
sdch_manager_(NULL), |
is_spdy_disabled_by_policy_(false), |
- ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
+ v8_default_isolate_(v8::Isolate::GetCurrent()) { |
+ DCHECK(v8_default_isolate_); |
+ |
// We call RegisterPrefs() here (instead of inside browser_prefs.cc) to make |
// sure that everything is initialized in the right order. |
// |
@@ -545,6 +549,8 @@ void IOThread::Init() { |
globals_->proxy_script_fetcher_context.reset( |
ConstructProxyScriptFetcherContext(globals_, net_log_)); |
+ globals_->v8_default_isolate = v8_default_isolate_; |
+ |
sdch_manager_ = new net::SdchManager(); |
#if defined(OS_MACOSX) && !defined(OS_IOS) |
@@ -875,6 +881,7 @@ void IOThread::InitSystemRequestContextOnIOThread() { |
net_log_, |
globals_->proxy_script_fetcher_context.get(), |
system_proxy_config_service_.release(), |
+ v8_default_isolate_, |
command_line)); |
net::HttpNetworkSession::Params system_params; |