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

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

Issue 2474693002: [wrapper-tracing] Support for incrementally tracing ScopedPersistent (Closed)
Patch Set: Added bailout for tests when the flag is off Created 4 years, 1 month 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/core/events/PromiseRejectionEvent.cpp ('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 dc9c5da0851e71d5f0f48a00bf13bcc3dde373be..b7d273600e62806cf8be6124d10cc6260ac9dfd6 100644
--- a/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
+++ b/third_party/WebKit/Source/platform/heap/WrapperVisitor.h
@@ -23,7 +23,7 @@ template <typename T>
class Member;
class ScriptWrappable;
template <typename T>
-class ScopedPersistent;
+class TraceWrapperV8Reference;
class TraceWrapperBase;
template <typename T>
class TraceWrapperMember;
@@ -94,6 +94,10 @@ class PLATFORM_EXPORT WrapperVisitor {
template <typename T>
void traceWrappers(const T* traceable) const {
static_assert(sizeof(T), "T must be fully defined");
+ // Ideally, we'd assert that we can cast to TraceWrapperBase here.
+ static_assert(
+ IsGarbageCollectedType<T>::value,
+ "Only garbage collected objects can be used in traceWrappers().");
if (!traceable) {
return;
@@ -136,11 +140,8 @@ class PLATFORM_EXPORT WrapperVisitor {
}
virtual void traceWrappers(
- const ScopedPersistent<v8::Value>* persistent) const = 0;
- virtual void traceWrappers(
- const ScopedPersistent<v8::Object>* persistent) const = 0;
- virtual void markWrapper(
- const v8::PersistentBase<v8::Object>* persistent) const = 0;
+ const TraceWrapperV8Reference<v8::Value>&) const = 0;
+ virtual void markWrapper(const v8::PersistentBase<v8::Value>*) const = 0;
virtual void dispatchTraceWrappers(const TraceWrapperBase*) const = 0;
#define DECLARE_DISPATCH_TRACE_WRAPPERS(ClassName) \
« no previous file with comments | « third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698