Index: webkit/port/bindings/v8/v8_events.cpp |
=================================================================== |
--- webkit/port/bindings/v8/v8_events.cpp (revision 11014) |
+++ webkit/port/bindings/v8/v8_events.cpp (working copy) |
@@ -62,14 +62,9 @@ |
void V8AbstractEventListener::HandleEventHelper(v8::Handle<v8::Context> context, |
Event* event, |
+ v8::Handle<v8::Value> jsevent, |
bool isWindowEvent) { |
- // Enter the V8 context in which to perform the event handling. |
- v8::Context::Scope scope(context); |
- |
- // Get the V8 wrapper for the event object. |
- v8::Handle<v8::Value> jsevent = V8Proxy::EventToV8Object(event); |
- |
// For compatibility, we store the event object as a property on the window |
// called "event". Because this is the global namespace, we save away any |
// existing "event" property, and then restore it after executing the |
@@ -159,8 +154,16 @@ |
IF_DEVEL(log_info(frame, "Handling DOM event", m_frame->document()->URL())); |
- HandleEventHelper(context, event, isWindowEvent); |
+ { |
+ // Enter the V8 context in which to perform the event handling. |
+ v8::Context::Scope scope(context); |
+ // Get the V8 wrapper for the event object. |
+ v8::Handle<v8::Value> jsevent = V8Proxy::EventToV8Object(event); |
+ |
+ HandleEventHelper(context, event, jsevent, isWindowEvent); |
+ } |
+ |
Document::updateDocumentsRendering(); |
} |
@@ -507,7 +510,16 @@ |
if (context.IsEmpty()) |
return; |
- HandleEventHelper(context, event, isWindowEvent); |
+ { |
+ // Enter the V8 context in which to perform the event handling. |
+ v8::Context::Scope scope(context); |
+ |
+ // Get the V8 wrapper for the event object. |
+ v8::Handle<v8::Value> jsevent = |
+ WorkerContextExecutionProxy::EventToV8Object(event); |
+ |
+ HandleEventHelper(context, event, jsevent, isWindowEvent); |
+ } |
} |
v8::Local<v8::Value> V8WorkerContextEventListener::CallListenerFunction( |