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

Unified Diff: test/cctest/cctest.h

Issue 637263003: CcTest::isolate_used_ is used from multiple threads, make it atomic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | test/cctest/cctest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index 6d27074a6f1beb55facc95d54e4497ef9b8a7e9c..4f078690e1d3bd81f0919bf6be30c97a827e193e 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -117,7 +117,7 @@ class CcTest {
static v8::Isolate* isolate() {
CHECK(isolate_ != NULL);
- isolate_used_ = true;
+ v8::base::NoBarrier_Store(&isolate_used_, 1);
return isolate_;
}
@@ -149,7 +149,7 @@ class CcTest {
// TODO(dcarney): Remove.
// This must be called first in a test.
static void InitializeVM() {
- CHECK(!isolate_used_);
+ CHECK(!v8::base::NoBarrier_Load(&isolate_used_));
CHECK(!initialize_called_);
initialize_called_ = true;
v8::HandleScope handle_scope(CcTest::isolate());
@@ -181,7 +181,7 @@ class CcTest {
static CcTest* last_;
static v8::Isolate* isolate_;
static bool initialize_called_;
- static bool isolate_used_;
+ static v8::base::Atomic32 isolate_used_;
};
// Switches between all the Api tests using the threading support.
« no previous file with comments | « no previous file | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698