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

Unified Diff: Source/heap/Handle.h

Issue 196383024: Expose CrossThreadPersistent assignment operators. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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: Source/heap/Handle.h
diff --git a/Source/heap/Handle.h b/Source/heap/Handle.h
index 2df56dd4cdc9545165576a1faff971663c156b2d..efa1c7902102a09634d7dd496c78276c1f63282a 100644
--- a/Source/heap/Handle.h
+++ b/Source/heap/Handle.h
@@ -215,6 +215,9 @@ private:
friend class ThreadState;
};
+template<typename T>
+class CrossThreadPersistent;
+
// Persistent handles are used to store pointers into the
// managed heap. As long as the Persistent handle is alive
// the GC will keep the object pointed to alive. Persistent
@@ -329,14 +332,20 @@ public:
private:
T* m_raw;
+
+ friend class CrossThreadPersistent<T>;
};
// Unlike Persistent, we can destruct a CrossThreadPersistent in a thread
// different from the construction thread.
template<typename T>
class CrossThreadPersistent : public Persistent<T, GlobalPersistents> {
+ WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(CrossThreadPersistent);
+ WTF_DISALLOW_ZERO_ASSIGNMENT(CrossThreadPersistent);
public:
CrossThreadPersistent(T* raw) : Persistent<T, GlobalPersistents>(raw) { }
+
+ using Persistent<T, GlobalPersistents>::operator=;
};
// FIXME: derive affinity based on the collection.
« 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