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

Unified Diff: src/v8.cc

Issue 25697002: Revert "lazy instantiation of the default isolate" and "build fix for 17049". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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') | no next file » | 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 6c5375dd4b112974c6f4de5be8c9d956b297853b..62330c32d482aa9a1a74ba70f38d769bfff240da 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -79,24 +79,16 @@ bool V8::Initialize(Deserializer* des) {
}
-bool V8::TearDown() {
- Isolate* isolate = Isolate::UncheckedCurrent();
- if (isolate != NULL) {
- ASSERT(isolate->IsDefaultIsolate());
- if (isolate->IsInitialized()) isolate->TearDown();
- delete isolate;
- }
-
- // V8 was never initialized, nothing to do.
- if (Acquire_Load(&init_once) == ONCE_STATE_UNINITIALIZED) return true;
-
- // TODO(dcarney): Everything below this should be in some sort of mutex...
- Atomic32 living_isolates = Isolate::GetLivingIsolates();
+void V8::TearDown() {
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate->IsDefaultIsolate());
+ if (!isolate->IsInitialized()) return;
- // All isolates have to be torn down before clearing the LOperand
+ // The isolate has to be torn down before clearing the LOperand
// caches so that the optimizing compiler thread (if running)
// doesn't see an inconsistent view of the lithium instructions.
- if (living_isolates != 0) return false;
+ isolate->TearDown();
+ delete isolate;
ElementsAccessor::TearDown();
LOperand::TearDownCaches();
@@ -108,7 +100,6 @@ bool V8::TearDown() {
call_completed_callbacks_ = NULL;
Sampler::TearDown();
- return true;
}
« no previous file with comments | « src/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698