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

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

Issue 2660463003: CrossThreadPersistent should acquire a lock before assigning (Closed)
Patch Set: fix Created 3 years, 10 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..b222c0fadede18f977f4c7c9890a90f2dafdbd58 100644
--- a/third_party/WebKit/Source/platform/heap/Persistent.h
+++ b/third_party/WebKit/Source/platform/heap/Persistent.h
@@ -175,10 +175,9 @@ class PersistentBase {
NO_SANITIZE_ADDRESS
void assign(T* ptr) {
if (crossThreadnessConfiguration == CrossThreadPersistentConfiguration) {
- releaseStore(
- reinterpret_cast<void* volatile*>(
- const_cast<typename std::remove_const<T>::type**>(&m_raw)),
- const_cast<typename std::remove_const<T>::type*>(ptr));
+ CrossThreadPersistentRegion::LockScope persistentLock(
+ ProcessHeap::crossThreadPersistentRegion());
+ m_raw = ptr;
} else {
m_raw = ptr;
}
« 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