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

Unified Diff: src/objects-inl.h

Issue 2872443003: [heap] Make object field write atomic if concurrent marking is enabled. (Closed)
Patch Set: Created 3 years, 7 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/heap/concurrent-marking.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 9e91da2cdc41a5a4a9c9019fc0c947e5db64347b..69598a497abbaf653d35c5580d1529d260f7061b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1303,8 +1303,15 @@ bool JSObject::PrototypeHasNoElements(Isolate* isolate, JSObject* object) {
reinterpret_cast<Object*>(base::NoBarrier_Load( \
reinterpret_cast<const base::AtomicWord*>(FIELD_ADDR_CONST(p, offset))))
+#if V8_CONCURRENT_MARKING
+#define WRITE_FIELD(p, offset, value) \
+ base::NoBarrier_Store( \
+ reinterpret_cast<base::AtomicWord*>(FIELD_ADDR(p, offset)), \
+ reinterpret_cast<base::AtomicWord>(value));
+#else
#define WRITE_FIELD(p, offset, value) \
(*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
+#endif
#define RELEASE_WRITE_FIELD(p, offset, value) \
base::Release_Store( \
« no previous file with comments | « src/heap/concurrent-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698