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

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

Issue 2406333002: Remove CrossThreadPersistent::release (Closed)
Patch Set: added comment Created 4 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 | « third_party/WebKit/Source/platform/Supplementable.h ('k') | 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 36539c7efee59f111a0f3b4660e7ed5291eaf188..322054216275a739120a3e58acf2854b919f74f2 100644
--- a/third_party/WebKit/Source/platform/heap/Persistent.h
+++ b/third_party/WebKit/Source/platform/heap/Persistent.h
@@ -454,6 +454,11 @@ class CrossThreadPersistent
T* atomicGet() { return Parent::atomicGet(); }
+ // Instead of using release(), assign then clear() instead.
+ // Using release() with per thread heap enabled can cause the object to be
+ // destroyed before assigning it to a new handle.
+ T* release() = delete;
+
template <typename U>
CrossThreadPersistent& operator=(U* other) {
Parent::operator=(other);
« no previous file with comments | « third_party/WebKit/Source/platform/Supplementable.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698