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

Unified Diff: src/v8.cc

Issue 582953002: Revert "Require V8 to be explicitly initialized before an Isolate is created" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/v8.h ('k') | test/cctest/cctest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/v8.h ('k') | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698