diff options
author | Leon Clarke <leonclarke@google.com> | 2010-07-15 12:03:35 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-07-20 16:57:23 +0100 |
commit | e458d70a0d18538346f41b503114c9ebe6b2ce12 (patch) | |
tree | 86f1637deca2c524432a822e5fcedd4bef221091 /WebCore/bindings/v8/ScriptEventListener.cpp | |
parent | f43eabc081f7ce6af24b9df4953498a3cd6ca24d (diff) | |
download | external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.zip external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.gz external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.bz2 |
Merge WebKit at r63173 : Initial merge by git.
Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
Diffstat (limited to 'WebCore/bindings/v8/ScriptEventListener.cpp')
-rw-r--r-- | WebCore/bindings/v8/ScriptEventListener.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/WebCore/bindings/v8/ScriptEventListener.cpp b/WebCore/bindings/v8/ScriptEventListener.cpp index 63e7dff..72df79d 100644 --- a/WebCore/bindings/v8/ScriptEventListener.cpp +++ b/WebCore/bindings/v8/ScriptEventListener.cpp @@ -100,28 +100,32 @@ PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame* frame, Attri return V8LazyEventListener::create(attr->localName().string(), frame->document()->isSVGDocument(), attr->value(), sourceURL, lineNumber, columnNumber, WorldContextHandle(UseMainWorld)); } -String eventListenerHandlerBody(ScriptExecutionContext* context, ScriptState* scriptState, EventListener* listener) +String eventListenerHandlerBody(Document* document, EventListener* listener) { if (listener->type() != EventListener::JSEventListenerType) return ""; - ScriptScope scope(scriptState); + v8::HandleScope scope; V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener); - v8::Handle<v8::Object> function = v8Listener->getListenerObject(context); + v8::Handle<v8::Context> context = toV8Context(document, v8Listener->worldContext()); + v8::Context::Scope contextScope(context); + v8::Handle<v8::Object> function = v8Listener->getListenerObject(document); if (function.IsEmpty()) return ""; return toWebCoreStringWithNullCheck(function); } -bool eventListenerHandlerLocation(ScriptExecutionContext* context, ScriptState* scriptState, EventListener* listener, String& sourceName, int& lineNumber) +bool eventListenerHandlerLocation(Document* document, EventListener* listener, String& sourceName, int& lineNumber) { if (listener->type() != EventListener::JSEventListenerType) return false; - ScriptScope scope(scriptState); + v8::HandleScope scope; V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener); - v8::Handle<v8::Object> object = v8Listener->getListenerObject(context); + v8::Handle<v8::Context> context = toV8Context(document, v8Listener->worldContext()); + v8::Context::Scope contextScope(context); + v8::Handle<v8::Object> object = v8Listener->getListenerObject(document); if (object.IsEmpty() || !object->IsFunction()) return false; |