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

Unified Diff: third_party/WebKit/Source/platform/heap/Persistent.h

Issue 2660463003: CrossThreadPersistent should acquire a lock before assigning (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/Persistent.h
diff --git a/third_party/WebKit/Source/platform/heap/Persistent.h b/third_party/WebKit/Source/platform/heap/Persistent.h
index 3fe022c0d501394e5d665b62fd59cc5242a22f6e..cc370354ede3e5b2e3d458d898a578c104198c6d 100644
--- a/third_party/WebKit/Source/platform/heap/Persistent.h
+++ b/third_party/WebKit/Source/platform/heap/Persistent.h
@@ -175,6 +175,8 @@ class PersistentBase {
NO_SANITIZE_ADDRESS
void assign(T* ptr) {
if (crossThreadnessConfiguration == CrossThreadPersistentConfiguration) {
+ CrossThreadPersistentRegion::LockScope persistentLock(
+ ProcessHeap::crossThreadPersistentRegion());
releaseStore(
sof 2017/02/09 06:36:24 With the lock held, this could be a 'normal' store
reinterpret_cast<void* volatile*>(
const_cast<typename std::remove_const<T>::type**>(&m_raw)),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698