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

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

Issue 2207333002: Support CrossThreadWeakPersistent PostTask on per thread heap enabled thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 3 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 37399f545ca475db1e18cd29ce91cdf00fed7e81..baf4856b2492d239263ed0dbd995095c747ce6fc 100644
--- a/third_party/WebKit/Source/platform/heap/Persistent.h
+++ b/third_party/WebKit/Source/platform/heap/Persistent.h
@@ -766,6 +766,15 @@ struct IsWeakReceiver<blink::WeakPersistent<T>> : std::true_type {};
template <typename T>
struct IsWeakReceiver<blink::CrossThreadWeakPersistent<T>> : std::true_type {};
+template <typename T>
+struct BindUnwrapTraits<blink::CrossThreadWeakPersistent<T>> {
+ static blink::CrossThreadPersistent<T> Unwrap(const blink::CrossThreadWeakPersistent<T>& wrapped)
+ {
+ blink::CrossThreadPersistentRegion::LockScope persistentLock(blink::ProcessHeap::crossThreadPersistentRegion());
+ return blink::CrossThreadPersistent<T>(wrapped.get());
+ }
+};
+
}
#endif // Persistent_h
« 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