Index: src/debug.h |
diff --git a/src/debug.h b/src/debug.h |
index 9b14afcb34914b9c0d0c8741c965ab69b1c846be..a95ecf27e847ab12b12ac375c1468d655bbb1d7c 100644 |
--- a/src/debug.h |
+++ b/src/debug.h |
@@ -8,6 +8,7 @@ |
#include "src/allocation.h" |
#include "src/arguments.h" |
#include "src/assembler.h" |
+#include "src/base/atomicops.h" |
#include "src/base/platform/platform.h" |
#include "src/execution.h" |
#include "src/factory.h" |
@@ -459,7 +460,10 @@ class Debug { |
} |
// Flags and states. |
- DebugScope* debugger_entry() { return thread_local_.current_debug_scope_; } |
+ DebugScope* debugger_entry() { |
+ return reinterpret_cast<DebugScope*>( |
+ base::NoBarrier_Load(&thread_local_.current_debug_scope_)); |
+ } |
inline Handle<Context> debug_context() { return debug_context_; } |
void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } |
bool live_edit_enabled() const { |
@@ -470,7 +474,7 @@ class Debug { |
inline bool is_loaded() const { return !debug_context_.is_null(); } |
inline bool has_break_points() const { return has_break_points_; } |
inline bool in_debug_scope() const { |
- return thread_local_.current_debug_scope_ != NULL; |
+ return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_); |
} |
void set_disable_break(bool v) { break_disabled_ = v; } |
@@ -599,7 +603,7 @@ class Debug { |
class ThreadLocal { |
public: |
// Top debugger entry. |
- DebugScope* current_debug_scope_; |
+ base::AtomicWord current_debug_scope_; |
// Counter for generating next break id. |
int break_count_; |