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

Unified Diff: third_party/WebKit/Source/platform/heap/WrapperVisitor.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
« 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/WrapperVisitor.h
diff --git a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
index 0a2c2cf3023e32f84a5863697f28c377eb4c48be..d0b0bb8b58f0181de6cb003571ab70d1a7a3c674 100644
--- a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
+++ b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
@@ -97,7 +97,13 @@ public:
if (!traceable)
return;
- TraceTrait<T>::markWrapper(this, traceable);
+ if (TraceTrait<T>::heapObjectHeader(traceable)->isWrapperHeaderMarked())
+ return;
+
+ pushToMarkingDeque(
+ TraceTrait<T>::markWrapper,
+ TraceTrait<T>::heapObjectHeader,
+ traceable);
}
template<typename T>
@@ -117,8 +123,13 @@ public:
#undef DECLARE_DISPATCH_TRACE_WRAPPERS
virtual void dispatchTraceWrappers(const void*) const = 0;
- virtual bool markWrapperHeader(const ScriptWrappable*) const = 0;
- virtual bool markWrapperHeader(const void*) const = 0;
+ virtual bool markWrapperHeader(HeapObjectHeader*) const = 0;
+ virtual void markWrappersInAllWorlds(const ScriptWrappable*) const = 0;
+ virtual void markWrappersInAllWorlds(const void*) const = 0;
+ virtual void pushToMarkingDeque(
+ void (*traceWrappersCallback)(const WrapperVisitor*, const void*),
+ HeapObjectHeader* (*heapObjectHeaderCallback)(const void*),
+ const void*) const = 0;
};
} // namespace blink
« 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