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

Unified Diff: Source/bindings/tests/results/V8TestInterfacePython2.cpp

Issue 181513002: Kill [SetWrapperReferenceFromReference] IDL extended attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 6 years, 10 months 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: 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;
}

Powered by Google App Engine
This is Rietveld 408576698