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

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

Issue 2084513002: Store raw pointers in ScriptWrappableVisitor markind deque (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 4 years, 6 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: third_party/WebKit/Source/platform/heap/GarbageCollected.h
diff --git a/third_party/WebKit/Source/platform/heap/GarbageCollected.h b/third_party/WebKit/Source/platform/heap/GarbageCollected.h
index 3624eba5d986fcd7c1672999aecee8b39d7a1d35..2f17304a8112f3e76040b4888790596d3f03c9f6 100644
--- a/third_party/WebKit/Source/platform/heap/GarbageCollected.h
+++ b/third_party/WebKit/Source/platform/heap/GarbageCollected.h
@@ -74,6 +74,7 @@ public:
virtual void trace(InlinedGlobalMarkingVisitor);
virtual void adjustAndMarkWrapper(const WrapperVisitor*) const = 0;
virtual bool isHeapObjectAlive() const = 0;
+ virtual HeapObjectHeader* adjustAndGetHeapObjectHeader() const = 0;
};
#define DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(VISITOR, TYPE) \
@@ -97,9 +98,13 @@ public:
{ \
typedef WTF::IsSubclassOfTemplate<typename std::remove_const<TYPE>::type, blink::GarbageCollected> IsSubclassOfGarbageCollected; \
static_assert(IsSubclassOfGarbageCollected::value, "only garbage collected objects can have garbage collected mixins"); \
- if (visitor->markWrapperHeader(static_cast<const TYPE*>(this))) { \
- visitor->dispatchTraceWrappers(static_cast<const TYPE*>(this)); \
- } \
+ TraceTrait<TYPE>::markWrapper(visitor, static_cast<const TYPE*>(this)); \
+ } \
+ HeapObjectHeader* adjustAndGetHeapObjectHeader() const override \
+ { \
+ typedef WTF::IsSubclassOfTemplate<typename std::remove_const<TYPE>::type, blink::GarbageCollected> IsSubclassOfGarbageCollected; \
+ static_assert(IsSubclassOfGarbageCollected::value, "only garbage collected objects can have garbage collected mixins"); \
+ return TraceTrait<TYPE>::heapObjectHeader(static_cast<const TYPE*>(this)); \
} \
private:

Powered by Google App Engine
This is Rietveld 408576698