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

Unified Diff: src/isolate.cc

Issue 262163006: Removed default Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 7 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/isolate.h ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index d93639b5d0836a642ba23278a6061c0ab145674e..dd7235ba4e0c44dc589769123b45463d0490a019 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -103,7 +103,6 @@ v8::TryCatch* ThreadLocalTop::TryCatchHandler() {
}
-Isolate* Isolate::default_isolate_ = NULL;
Thread::LocalStorageKey Isolate::isolate_key_;
Thread::LocalStorageKey Isolate::thread_id_key_;
Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_;
@@ -166,7 +165,7 @@ void Isolate::SetCrashIfDefaultIsolateInitialized() {
void Isolate::EnsureDefaultIsolate() {
LockGuard<Mutex> lock_guard(&process_wide_mutex_);
CHECK(default_isolate_status_ != kDefaultIsolateCrashIfInitialized);
- if (default_isolate_ == NULL) {
+ if (thread_data_table_ == NULL) {
isolate_key_ = Thread::CreateThreadLocalKey();
thread_id_key_ = Thread::CreateThreadLocalKey();
per_isolate_thread_data_key_ = Thread::CreateThreadLocalKey();
@@ -174,12 +173,6 @@ void Isolate::EnsureDefaultIsolate() {
PerThreadAssertScopeBase::thread_local_key = Thread::CreateThreadLocalKey();
#endif // DEBUG
thread_data_table_ = new Isolate::ThreadDataTable();
- default_isolate_ = new Isolate();
- }
- // Can't use SetIsolateThreadLocals(default_isolate_, NULL) here
- // because a non-null thread data may be already set.
- if (Thread::GetThreadLocal(isolate_key_) == NULL) {
- Thread::SetThreadLocal(isolate_key_, default_isolate_);
}
}
@@ -1523,9 +1516,7 @@ void Isolate::TearDown() {
serialize_partial_snapshot_cache_ = NULL;
}
- if (!IsDefaultIsolate()) {
- delete this;
- }
+ delete this;
// Restore the previous current isolate.
SetIsolateThreadLocals(saved_isolate, saved_data);
« no previous file with comments | « src/isolate.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698