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

Unified Diff: Source/platform/heap/Handle.h

Issue 1249913002: Make ContentDecryptionModuleResult cross-thread destructible. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use CrossThreadPersistent<> instead Created 5 years, 5 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
Index: Source/platform/heap/Handle.h
diff --git a/Source/platform/heap/Handle.h b/Source/platform/heap/Handle.h
index dc153a8d64edba0c812ef404f143e2a8f39f8f19..31062d062584a457ea66ac4deb2f99d59f6f7042 100644
--- a/Source/platform/heap/Handle.h
+++ b/Source/platform/heap/Handle.h
@@ -454,6 +454,11 @@ private:
PersistentNode* m_persistentNode;
};
+// A class T having a public CROSS_THREAD_ACCESSIBLE() declaration makes
+// WebPrivatePtr<T> refer to objects of type T using a CrossThreadPersistent<T>.
+// This to allow WebPrivatePtr<T> objects to be destructed on another thread.
+#define CROSS_THREAD_ACCESSIBLE() typedef int IsCrossThreadAccessibleMarker
+
// PersistentNode must be the left-most class to let the
// visitor->trace(static_cast<Collection*>(this)) trace the correct position.
// FIXME: derive affinity based on the collection.

Powered by Google App Engine
This is Rietveld 408576698