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 8582768bcd90d4a6267ed15cc8e1bbd68faa232d..d5f791a1388f053fe41f55b8adfeb631bc1bcc30 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitor.cpp |
@@ -7,6 +7,7 @@ |
#include "bindings/core/v8/ActiveScriptWrappable.h" |
#include "bindings/core/v8/DOMWrapperWorld.h" |
#include "bindings/core/v8/ScopedPersistent.h" |
+#include "bindings/core/v8/ScriptWrappable.h" |
#include "bindings/core/v8/ScriptWrappableVisitorVerifier.h" |
#include "bindings/core/v8/V8AbstractEventListener.h" |
#include "bindings/core/v8/WrapperTypeInfo.h" |
@@ -237,6 +238,19 @@ void ScriptWrappableVisitor::writeBarrier( |
&(const_cast<TraceWrapperV8Reference<v8::Value>*>(dstObject)->get())); |
} |
+void ScriptWrappableVisitor::writeBarrier( |
+ const void* srcObject, |
+ const v8::Persistent<v8::Object>* dstObject) { |
+ if (!srcObject || !dstObject || dstObject->IsEmpty()) { |
+ return; |
+ } |
+ if (!HeapObjectHeader::fromPayload(srcObject)->isWrapperHeaderMarked()) { |
+ return; |
+ } |
+ currentVisitor(ThreadState::current()->isolate()) |
+ ->markWrapper(&(dstObject->As<v8::Value>())); |
+} |
+ |
void ScriptWrappableVisitor::traceWrappers( |
const TraceWrapperV8Reference<v8::Value>& tracedWrapper) const { |
markWrapper( |