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

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

Issue 2592063002: SameThreadCheckedMember<>: verify same-thread usage of heap references. (Closed)
Patch Set: emphasize that the extended Member is for diagnosing/debugging Created 4 years 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/heap/TraceTraits.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/Visitor.h
diff --git a/third_party/WebKit/Source/platform/heap/Visitor.h b/third_party/WebKit/Source/platform/heap/Visitor.h
index 6b8c13a66fe25a8ab9fd628c1d42c03703e5396e..82ea4331ab7f4c3946c215147d5271045bae09d4 100644
--- a/third_party/WebKit/Source/platform/heap/Visitor.h
+++ b/third_party/WebKit/Source/platform/heap/Visitor.h
@@ -51,6 +51,8 @@ class TraceTrait;
class ThreadState;
class Visitor;
template <typename T>
+class SameThreadCheckedMember;
+template <typename T>
class TraceWrapperMember;
// The TraceMethodDelegate is used to convert a trace method for type T to a
@@ -163,6 +165,11 @@ class VisitorHelper {
trace(*(static_cast<const Member<T>*>(&t)));
}
+ template <typename T>
+ void trace(const SameThreadCheckedMember<T>& t) {
+ trace(*(static_cast<const Member<T>*>(&t)));
+ }
+
// Fallback method used only when we need to trace raw pointers of T.
// This is the case when a member is a union where we do not support members.
template <typename T>
« no previous file with comments | « third_party/WebKit/Source/platform/heap/TraceTraits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698