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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h
index 6c633518c8377530f9e5486a1f2e36f963112d58..44d922d9c5398511537ef43a58809d2e88b35536 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.h
@@ -5,7 +5,6 @@
#ifndef ScriptWrappableVisitor_h
#define ScriptWrappableVisitor_h
-#include "bindings/core/v8/ScopedPersistent.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -20,6 +19,8 @@ namespace blink {
class HeapObjectHeader;
template <typename T>
class Member;
+template <typename T>
+class TraceWrapperV8Reference;
class WrapperMarkingData {
public:
@@ -103,6 +104,9 @@ class CORE_EXPORT ScriptWrappableVisitor : public WrapperVisitor,
static WrapperVisitor* currentVisitor(v8::Isolate*);
+ static void writeBarrier(const void*,
+ const TraceWrapperV8Reference<v8::Value>*);
+
template <typename T>
static void writeBarrier(const void* object, const Member<T> value) {
writeBarrier(object, value.get());
@@ -117,8 +121,8 @@ class CORE_EXPORT ScriptWrappableVisitor : public WrapperVisitor,
return;
}
// We only require a write barrier if |srcObject| is already marked. Note
- // that this implicitly disabled the write barrier when wrapper tracing
- // is not active as object will not be marked in this case.
+ // that this implicitly disables the write barrier when the GC is not
+ // active as object will not be marked in this case.
if (!HeapObjectHeader::fromPayload(srcObject)->isWrapperHeaderMarked()) {
return;
}
@@ -162,10 +166,8 @@ class CORE_EXPORT ScriptWrappableVisitor : public WrapperVisitor,
NOTREACHED();
}
- void traceWrappers(const ScopedPersistent<v8::Value>*) const override;
- void traceWrappers(const ScopedPersistent<v8::Object>*) const override;
- void markWrapper(const v8::PersistentBase<v8::Value>* handle) const;
- void markWrapper(const v8::PersistentBase<v8::Object>* handle) const override;
+ void traceWrappers(const TraceWrapperV8Reference<v8::Value>&) const override;
+ void markWrapper(const v8::PersistentBase<v8::Value>*) const override;
void invalidateDeadObjectsInMarkingDeque();

Powered by Google App Engine
This is Rietveld 408576698