| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 4daeddcb67602f13387715fa1cf23b17e8bb9175..59f8b2e8437b7afa330ee17115ec870f809610c5 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -336,6 +336,9 @@ Isolate* Isolate::default_isolate_ = NULL;
|
| Thread::LocalStorageKey Isolate::isolate_key_;
|
| Thread::LocalStorageKey Isolate::thread_id_key_;
|
| Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_;
|
| +#ifdef DEBUG
|
| +Thread::LocalStorageKey PerThreadAssertScopeBase::thread_local_key;
|
| +#endif // DEBUG
|
| Mutex* Isolate::process_wide_mutex_ = OS::CreateMutex();
|
| Isolate::ThreadDataTable* Isolate::thread_data_table_ = NULL;
|
| Atomic32 Isolate::isolate_counter_ = 0;
|
| @@ -392,6 +395,9 @@ void Isolate::EnsureDefaultIsolate() {
|
| isolate_key_ = Thread::CreateThreadLocalKey();
|
| thread_id_key_ = Thread::CreateThreadLocalKey();
|
| per_isolate_thread_data_key_ = Thread::CreateThreadLocalKey();
|
| +#ifdef DEBUG
|
| + PerThreadAssertScopeBase::thread_local_key = Thread::CreateThreadLocalKey();
|
| +#endif // DEBUG
|
| thread_data_table_ = new Isolate::ThreadDataTable();
|
| default_isolate_ = new Isolate();
|
| }
|
| @@ -889,7 +895,7 @@ void Isolate::PrintStack(StringStream* accumulator) {
|
| return;
|
| }
|
| // The MentionedObjectCache is not GC-proof at the moment.
|
| - AssertNoAllocation nogc;
|
| + DisallowHeapAllocation no_gc;
|
| ASSERT(StringStream::IsMentionedObjectCacheClear());
|
|
|
| // Avoid printing anything if there are no frames.
|
| @@ -974,7 +980,7 @@ bool Isolate::MayNamedAccess(JSObject* receiver, Object* key,
|
| ASSERT(receiver->IsAccessCheckNeeded());
|
|
|
| // The callers of this method are not expecting a GC.
|
| - AssertNoAllocation no_gc;
|
| + DisallowHeapAllocation no_gc;
|
|
|
| // Skip checks for hidden properties access. Note, we do not
|
| // require existence of a context in this case.
|
| @@ -1780,9 +1786,6 @@ Isolate::Isolate()
|
| memset(&js_spill_information_, 0, sizeof(js_spill_information_));
|
| memset(code_kind_statistics_, 0,
|
| sizeof(code_kind_statistics_[0]) * Code::NUMBER_OF_KINDS);
|
| -
|
| - compiler_thread_handle_deref_state_ = HandleDereferenceGuard::ALLOW;
|
| - execution_thread_handle_deref_state_ = HandleDereferenceGuard::ALLOW;
|
| #endif
|
|
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| @@ -2405,34 +2408,6 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) {
|
| }
|
|
|
|
|
| -#ifdef DEBUG
|
| -HandleDereferenceGuard::State Isolate::HandleDereferenceGuardState() {
|
| - if (execution_thread_handle_deref_state_ == HandleDereferenceGuard::ALLOW &&
|
| - compiler_thread_handle_deref_state_ == HandleDereferenceGuard::ALLOW) {
|
| - // Short-cut to avoid polling thread id.
|
| - return HandleDereferenceGuard::ALLOW;
|
| - }
|
| - if (FLAG_parallel_recompilation &&
|
| - optimizing_compiler_thread()->IsOptimizerThread()) {
|
| - return compiler_thread_handle_deref_state_;
|
| - } else {
|
| - return execution_thread_handle_deref_state_;
|
| - }
|
| -}
|
| -
|
| -
|
| -void Isolate::SetHandleDereferenceGuardState(
|
| - HandleDereferenceGuard::State state) {
|
| - if (FLAG_parallel_recompilation &&
|
| - optimizing_compiler_thread()->IsOptimizerThread()) {
|
| - compiler_thread_handle_deref_state_ = state;
|
| - } else {
|
| - execution_thread_handle_deref_state_ = state;
|
| - }
|
| -}
|
| -#endif
|
| -
|
| -
|
| HStatistics* Isolate::GetHStatistics() {
|
| if (hstatistics() == NULL) set_hstatistics(new HStatistics());
|
| return hstatistics();
|
|
|