Index: Source/bindings/tests/results/V8TestInterfacePython2.cpp |
diff --git a/Source/bindings/tests/results/V8TestInterfacePython2.cpp b/Source/bindings/tests/results/V8TestInterfacePython2.cpp |
index 3c709173395a74d9a89375fa29abf6b7efd42c77..45623befd58bc93988d5470c481f234d4285fb5e 100644 |
--- a/Source/bindings/tests/results/V8TestInterfacePython2.cpp |
+++ b/Source/bindings/tests/results/V8TestInterfacePython2.cpp |
@@ -80,8 +80,10 @@ template <typename T> void V8_USE(T) { } |
void V8TestInterfacePython2::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate) |
{ |
TestInterfacePython2* impl = fromInternalPointer(object); |
- if (Node* owner = impl->ownerNode()) { |
- Node* root = V8GCController::opaqueRootForGC(owner, isolate); |
+ // The ownerNode() method may return a reference or a pointer but |
+ // RefPtr can be constructed from either. |
+ if (RefPtr<Node> owner = PassRefPtr<Node>(impl->ownerNode())) { |
+ Node* root = V8GCController::opaqueRootForGC(owner.get(), isolate); |
isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper); |
return; |
} |