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

Unified Diff: src/isolate.cc

Issue 6903154: Revert "This implements per-isolate locking and unlocking, including tests" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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/objects.h » ('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 0b0f0bf58259cd68c20ddb508a274e8d5dc879ca..6fc671c50c404d66b11c7bfe92eed7883ac698e9 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -311,17 +311,6 @@ Isolate::PerIsolateThreadData*
}
-Isolate::PerIsolateThreadData* Isolate::FindPerThreadDataForThisThread() {
- ThreadId thread_id = ThreadId::Current();
- PerIsolateThreadData* per_thread = NULL;
- {
- ScopedLock lock(process_wide_mutex_);
- per_thread = thread_data_table_->Lookup(this, thread_id);
- }
- return per_thread;
-}
-
-
void Isolate::EnsureDefaultIsolate() {
ScopedLock lock(process_wide_mutex_);
if (default_isolate_ == NULL) {
@@ -333,9 +322,7 @@ void Isolate::EnsureDefaultIsolate() {
}
// Can't use SetIsolateThreadLocals(default_isolate_, NULL) here
// becase a non-null thread data may be already set.
- if (Thread::GetThreadLocal(isolate_key_) == NULL) {
- Thread::SetThreadLocal(isolate_key_, default_isolate_);
- }
+ Thread::SetThreadLocal(isolate_key_, default_isolate_);
CHECK(default_isolate_->PreInit());
}
@@ -471,11 +458,6 @@ Isolate::Isolate()
zone_.isolate_ = this;
stack_guard_.isolate_ = this;
- // ThreadManager is initialized early to support locking an isolate
- // before it is entered.
- thread_manager_ = new ThreadManager();
- thread_manager_->isolate_ = this;
-
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
simulator_initialized_ = false;
@@ -661,6 +643,7 @@ bool Isolate::PreInit() {
TRACE_ISOLATE(preinit);
ASSERT(Isolate::Current() == this);
+
#ifdef ENABLE_DEBUGGER_SUPPORT
debug_ = new Debug(this);
debugger_ = new Debugger();
@@ -688,6 +671,8 @@ bool Isolate::PreInit() {
string_tracker_ = new StringTracker();
string_tracker_->isolate_ = this;
+ thread_manager_ = new ThreadManager();
+ thread_manager_->isolate_ = this;
compilation_cache_ = new CompilationCache(this);
transcendental_cache_ = new TranscendentalCache();
keyed_lookup_cache_ = new KeyedLookupCache();
@@ -698,7 +683,7 @@ bool Isolate::PreInit() {
write_input_buffer_ = new StringInputBuffer();
global_handles_ = new GlobalHandles(this);
bootstrapper_ = new Bootstrapper();
- handle_scope_implementer_ = new HandleScopeImplementer(this);
+ handle_scope_implementer_ = new HandleScopeImplementer();
stub_cache_ = new StubCache(this);
ast_sentinels_ = new AstSentinels();
regexp_stack_ = new RegExpStack();
@@ -715,7 +700,6 @@ bool Isolate::PreInit() {
void Isolate::InitializeThreadLocal() {
- thread_local_top_.isolate_ = this;
thread_local_top_.Initialize();
clear_pending_exception();
clear_pending_message();
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698