Index: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
index 124538fb9115200fc5e0eb1a21dfe713e96ea003..81e5e4e8064bb8f6407c6ff0bc92382ef2daddf6 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
@@ -31,8 +31,9 @@ void ScriptWrappableVisitor::TracePrologue() |
void ScriptWrappableVisitor::TraceEpilogue() |
{ |
- for (auto header : m_headersToUnmark) |
+ for (auto header : m_headersToUnmark) { |
header->unmarkWrapperHeader(); |
+ } |
m_headersToUnmark.clear(); |
m_tracingInProgress = false; |
@@ -58,34 +59,36 @@ void ScriptWrappableVisitor::traceWrappersFrom(std::pair<void*, void*> internalF |
ASSERT(wrapperTypeInfo->wrapperClassId == WrapperTypeInfo::NodeClassId |
|| wrapperTypeInfo->wrapperClassId == WrapperTypeInfo::ObjectClassId); |
- wrapperTypeInfo->traceWrappers(this, scriptWrappable); |
+ scriptWrappable->traceWrappers(this); |
} |
-bool ScriptWrappableVisitor::markWrapperHeader(const void* garbageCollected, const void* objectTopPointer) const |
+bool ScriptWrappableVisitor::markWrapperHeader(HeapObjectHeader* header) const |
{ |
- HeapObjectHeader* header = HeapObjectHeader::fromPayload(objectTopPointer); |
if (header->isWrapperHeaderMarked()) |
return false; |
header->markWrapperHeader(); |
- addHeaderToUnmark(header); |
+ m_headersToUnmark.append(header); |
return true; |
} |
-bool ScriptWrappableVisitor::markWrapperHeader(const ScriptWrappable* scriptWrappable, const void* objectTopPointer) const |
+bool ScriptWrappableVisitor::markWrapperHeader(const void* garbageCollected) const |
+{ |
+ HeapObjectHeader* header = HeapObjectHeader::fromPayload(garbageCollected); |
+ return markWrapperHeader(header); |
+} |
+ |
+bool ScriptWrappableVisitor::markWrapperHeader(const ScriptWrappable* scriptWrappable) const |
{ |
- if (!markWrapperHeader(objectTopPointer, objectTopPointer)) |
+ if (!markWrapperHeader(scriptWrappable->wrapperTypeInfo()-> |
+ getHeader(const_cast<ScriptWrappable*>(scriptWrappable)))) { |
return false; |
+ } |
markWrappersInAllWorlds(scriptWrappable, m_isolate); |
return true; |
} |
-void ScriptWrappableVisitor::addHeaderToUnmark(HeapObjectHeader* header) const |
-{ |
- m_headersToUnmark.append(header); |
-} |
- |
void ScriptWrappableVisitor::markWrappersInAllWorlds(const ScriptWrappable* scriptWrappable, v8::Isolate* isolate) |
{ |
DOMWrapperWorld::markWrappersInAllWorlds(const_cast<ScriptWrappable*>(scriptWrappable), isolate); |