| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 5f7b3f2d3b6134b0c8518d76eca776ad1d8b98fd..24ec0566d5e3fe5f1251d0b717cb093c7ec69327 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -1713,7 +1713,8 @@ Isolate::Isolate()
|
| memset(code_kind_statistics_, 0,
|
| sizeof(code_kind_statistics_[0]) * Code::NUMBER_OF_KINDS);
|
|
|
| - allow_handle_deref_ = true;
|
| + allow_compiler_thread_handle_deref_ = true;
|
| + allow_execution_thread_handle_deref_ = true;
|
| #endif
|
|
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| @@ -2321,6 +2322,33 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) {
|
| }
|
|
|
|
|
| +#ifdef DEBUG
|
| +bool Isolate::AllowHandleDereference() {
|
| + if (allow_execution_thread_handle_deref_ &&
|
| + allow_compiler_thread_handle_deref_) {
|
| + // Short-cut to avoid polling thread id.
|
| + return true;
|
| + }
|
| + if (FLAG_parallel_recompilation &&
|
| + optimizing_compiler_thread()->IsOptimizerThread()) {
|
| + return allow_compiler_thread_handle_deref_;
|
| + } else {
|
| + return allow_execution_thread_handle_deref_;
|
| + }
|
| +}
|
| +
|
| +
|
| +void Isolate::SetAllowHandleDereference(bool allow) {
|
| + if (FLAG_parallel_recompilation &&
|
| + optimizing_compiler_thread()->IsOptimizerThread()) {
|
| + allow_compiler_thread_handle_deref_ = allow;
|
| + } else {
|
| + allow_execution_thread_handle_deref_ = allow;
|
| + }
|
| +}
|
| +#endif
|
| +
|
| +
|
| HStatistics* Isolate::GetHStatistics() {
|
| if (hstatistics() == NULL) set_hstatistics(new HStatistics());
|
| return hstatistics();
|
|
|