Index: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
index 73b8d6303a5a952481764c84dd5752d3d2d18c9e..58c198e7ebce1c77944646335b07d3479d55130b 100644 |
--- a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
+++ b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp |
@@ -273,9 +273,7 @@ void V8InjectedScriptHost::getEventListenersMethodCustom(const v8::FunctionCallb |
if (!node) |
return; |
// This can only happen for orphan DocumentType nodes. |
- Document* document = node->document(); |
- if (!node->document()) |
- return; |
+ Document& document = node->document(); |
InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder()); |
Vector<EventListenerInfo> listenersArray; |
@@ -283,7 +281,7 @@ void V8InjectedScriptHost::getEventListenersMethodCustom(const v8::FunctionCallb |
v8::Local<v8::Object> result = v8::Object::New(); |
for (size_t i = 0; i < listenersArray.size(); ++i) { |
- v8::Handle<v8::Array> listeners = getJSListenerFunctions(document, listenersArray[i]); |
+ v8::Handle<v8::Array> listeners = getJSListenerFunctions(&document, listenersArray[i]); |
if (!listeners->Length()) |
continue; |
AtomicString eventType = listenersArray[i].eventType; |