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

Unified Diff: Source/bindings/v8/V8AbstractEventListener.cpp

Issue 14130021: invokeEventHandler should take a local handle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | « Source/bindings/v8/V8AbstractEventListener.h ('k') | Source/bindings/v8/V8WorkerContextEventListener.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8AbstractEventListener.cpp
diff --git a/Source/bindings/v8/V8AbstractEventListener.cpp b/Source/bindings/v8/V8AbstractEventListener.cpp
index 5abea5f30ab82e711633f4e498f82c6b90edb975..4e987289b595196e870be5b672b946505fb05076 100644
--- a/Source/bindings/v8/V8AbstractEventListener.cpp
+++ b/Source/bindings/v8/V8AbstractEventListener.cpp
@@ -92,10 +92,11 @@ void V8AbstractEventListener::handleEvent(ScriptExecutionContext* context, Event
v8::Context::Scope scope(v8Context);
// Get the V8 wrapper for the event object.
- v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>(), v8Context->GetIsolate());
+ v8::Isolate* isolate = v8Context->GetIsolate();
+ v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>(), isolate);
if (jsEvent.IsEmpty())
return;
- invokeEventHandler(context, event, jsEvent);
+ invokeEventHandler(context, event, v8::Local<v8::Value>::New(isolate, jsEvent));
}
void V8AbstractEventListener::setListenerObject(v8::Handle<v8::Object> listener)
@@ -104,7 +105,7 @@ void V8AbstractEventListener::setListenerObject(v8::Handle<v8::Object> listener)
WeakHandleListener<V8AbstractEventListener>::makeWeak(m_isolate, m_listener.get(), this);
}
-void V8AbstractEventListener::invokeEventHandler(ScriptExecutionContext* context, Event* event, v8::Handle<v8::Value> jsEvent)
+void V8AbstractEventListener::invokeEventHandler(ScriptExecutionContext* context, Event* event, v8::Local<v8::Value> jsEvent)
{
// If jsEvent is empty, attempt to set it as a hidden value would crash v8.
if (jsEvent.IsEmpty())
« no previous file with comments | « Source/bindings/v8/V8AbstractEventListener.h ('k') | Source/bindings/v8/V8WorkerContextEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698