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

Unified Diff: src/debug.cc

Issue 631223004: Fix data race on Debug::thread_local_.current_debug_scope_ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 2 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/debug.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index cacc8e274a9d7b5f567b6c78a243ec8bec03e850..2329b250f3e9ffdfd3e8bb5fac19f9a9958c505d 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -563,7 +563,8 @@ void Debug::ThreadInit() {
thread_local_.step_into_fp_ = 0;
thread_local_.step_out_fp_ = 0;
// TODO(isolates): frames_are_dropped_?
- thread_local_.current_debug_scope_ = NULL;
+ base::NoBarrier_Store(&thread_local_.current_debug_scope_,
+ static_cast<base::AtomicWord>(NULL));
thread_local_.restarter_frame_function_pointer_ = NULL;
}
@@ -3089,7 +3090,8 @@ DebugScope::DebugScope(Debug* debug)
no_termination_exceptons_(debug_->isolate_,
StackGuard::TERMINATE_EXECUTION) {
// Link recursive debugger entry.
- debug_->thread_local_.current_debug_scope_ = this;
+ base::NoBarrier_Store(&debug_->thread_local_.current_debug_scope_,
+ reinterpret_cast<base::AtomicWord>(this));
// Store the previous break id and frame id.
break_id_ = debug_->break_id();
@@ -3126,7 +3128,8 @@ DebugScope::~DebugScope() {
}
// Leaving this debugger entry.
- debug_->thread_local_.current_debug_scope_ = prev_;
+ base::NoBarrier_Store(&debug_->thread_local_.current_debug_scope_,
+ reinterpret_cast<base::AtomicWord>(prev_));
// Restore to the previous break state.
debug_->thread_local_.break_frame_id_ = break_frame_id_;
« no previous file with comments | « src/debug.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698