diff options
author | Steve Block <steveblock@google.com> | 2009-11-05 09:23:40 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-11-10 22:41:12 +0000 |
commit | cac0f67c402d107cdb10971b95719e2ff9c7c76b (patch) | |
tree | d182c7f87211c6f201a5f038e332336493ebdbe7 /WebCore/bindings/v8/custom/V8CustomEventListener.cpp | |
parent | 4b2ef0f288e7c6c4602f621b7a0e9feed304b70e (diff) | |
download | external_webkit-cac0f67c402d107cdb10971b95719e2ff9c7c76b.zip external_webkit-cac0f67c402d107cdb10971b95719e2ff9c7c76b.tar.gz external_webkit-cac0f67c402d107cdb10971b95719e2ff9c7c76b.tar.bz2 |
Merge webkit.org at r50258 : Initial merge by git.
Change-Id: I1a9e1dc4ed654b69174ad52a4f031a07240f37b0
Diffstat (limited to 'WebCore/bindings/v8/custom/V8CustomEventListener.cpp')
-rw-r--r-- | WebCore/bindings/v8/custom/V8CustomEventListener.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/WebCore/bindings/v8/custom/V8CustomEventListener.cpp b/WebCore/bindings/v8/custom/V8CustomEventListener.cpp index 91abecd..17c86a3 100644 --- a/WebCore/bindings/v8/custom/V8CustomEventListener.cpp +++ b/WebCore/bindings/v8/custom/V8CustomEventListener.cpp @@ -35,15 +35,15 @@ namespace WebCore { -V8EventListener::V8EventListener(Frame* frame, PassRefPtr<V8ListenerGuard> guard, v8::Local<v8::Object> listener, bool isAttribute) - : V8AbstractEventListener(frame, guard, isAttribute) +V8EventListener::V8EventListener(PassRefPtr<V8ListenerGuard> guard, v8::Local<v8::Object> listener, bool isAttribute) + : V8AbstractEventListener(guard, isAttribute) { setListenerObject(listener); } -v8::Local<v8::Function> V8EventListener::getListenerFunction() +v8::Local<v8::Function> V8EventListener::getListenerFunction(ScriptExecutionContext* context) { - v8::Local<v8::Object> listener = getListenerObject(); + v8::Local<v8::Object> listener = getListenerObject(context); // Has the listener been disposed? if (listener.IsEmpty()) @@ -61,19 +61,20 @@ v8::Local<v8::Function> V8EventListener::getListenerFunction() return v8::Local<v8::Function>(); } -v8::Local<v8::Value> V8EventListener::callListenerFunction(v8::Handle<v8::Value> jsEvent, Event* event) +v8::Local<v8::Value> V8EventListener::callListenerFunction(ScriptExecutionContext* context, v8::Handle<v8::Value> jsEvent, Event* event) { - v8::Local<v8::Function> handlerFunction = getListenerFunction(); + + v8::Local<v8::Function> handlerFunction = getListenerFunction(context); v8::Local<v8::Object> receiver = getReceiverObject(event); if (handlerFunction.IsEmpty() || receiver.IsEmpty()) return v8::Local<v8::Value>(); v8::Handle<v8::Value> parameters[1] = { jsEvent }; - V8Proxy* proxy = V8Proxy::retrieve(frame()); - if (!proxy) - return v8::Local<v8::Value>(); - return proxy->callFunction(handlerFunction, receiver, 1, parameters); + if (V8Proxy* proxy = V8Proxy::retrieve(context)) + return proxy->callFunction(handlerFunction, receiver, 1, parameters); + + return v8::Local<v8::Value>(); } } // namespace WebCore |