| Index: src/v8.cc
|
| diff --git a/src/v8.cc b/src/v8.cc
|
| index 62c3da4cf79399e4b5f2895f2bcba0975a678e37..d4f59a107a695c9c621e8c631e7f5b1132341189 100644
|
| --- a/src/v8.cc
|
| +++ b/src/v8.cc
|
| @@ -33,9 +33,14 @@ v8::ArrayBuffer::Allocator* V8::array_buffer_allocator_ = NULL;
|
| v8::Platform* V8::platform_ = NULL;
|
|
|
|
|
| -bool V8::Initialize() {
|
| +bool V8::Initialize(Deserializer* des) {
|
| InitializeOncePerProcess();
|
| - return true;
|
| + Isolate* isolate = Isolate::UncheckedCurrent();
|
| + if (isolate == NULL) return true;
|
| + if (isolate->IsDead()) return false;
|
| + if (isolate->IsInitialized()) return true;
|
| +
|
| + return isolate->Init(des);
|
| }
|
|
|
|
|
| @@ -74,8 +79,6 @@ void V8::InitializeOncePerProcessImpl() {
|
|
|
| base::OS::Initialize(FLAG_random_seed, FLAG_hard_abort, FLAG_gc_fake_mmap);
|
|
|
| - Isolate::InitializeOncePerProcess();
|
| -
|
| Sampler::SetUp();
|
| CpuFeatures::Probe(false);
|
| init_memcopy_functions();
|
|
|