Index: Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp |
diff --git a/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp b/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp |
index 24a1c98c0be87429082da8fdb7db8e3f87ec7025..e68a37b6d36e1417bbf344034cd58d00cbb632b8 100644 |
--- a/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp |
+++ b/Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp |
@@ -85,13 +85,7 @@ static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio |
return; |
} |
- Document* documentPtr = currentDOMWindow(isolate)->document(); |
- ASSERT(documentPtr); |
- Document& document = *documentPtr; |
- |
- // Make sure the document is added to the DOM Node map. Otherwise, the TestInterfaceNamedConstructor instance |
- // may end up being the only node in the map and get garbage-collected prematurely. |
- toV8(documentPtr, info.Holder(), isolate); |
+ Document& document = *toDocument(currentExecutionContext(isolate)); |
ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceNamedConstructor", info.Holder(), isolate); |
if (UNLIKELY(info.Length() < 1)) { |