Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: webkit/port/bindings/v8/v8_events.cpp

Issue 39217: Fix event handling problem in WorkerContext caused by r10987 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/port/bindings/v8/v8_events.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « webkit/port/bindings/v8/v8_events.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698