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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_types.py

Issue 2187503002: binding: Returns null if there is no valid event handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated the layout test expectation. Created 4 years, 5 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
Index: third_party/WebKit/Source/bindings/scripts/v8_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py
index 353c2a2645bac0f0930377189cad73acb99ad911..5b4c8ebd3ad3b48a685d30066d806e1652738bd4 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -862,7 +862,11 @@ CPP_VALUE_TO_V8_VALUE = {
'StringOrNull': '{cpp_value}.isNull() ? v8::Local<v8::Value>(v8::Null({isolate})) : v8String({isolate}, {cpp_value})',
# Special cases
'Dictionary': '{cpp_value}.v8Value()',
- 'EventHandler': '{cpp_value} ? v8::Local<v8::Value>(V8AbstractEventListener::cast({cpp_value})->getListenerObject(impl->getExecutionContext())) : v8::Local<v8::Value>(v8::Null({isolate}))',
+ 'EventHandler': (
+ '{cpp_value} ? ' +
+ 'V8AbstractEventListener::cast({cpp_value})->getListenerOrNull(' +
+ '{isolate}, impl->getExecutionContext()) : ' +
+ 'v8::Null({isolate}).As<v8::Value>()'),
'ScriptValue': '{cpp_value}.v8Value()',
'SerializedScriptValue': '{cpp_value} ? {cpp_value}->deserialize() : v8::Local<v8::Value>(v8::Null({isolate}))',
# General

Powered by Google App Engine
This is Rietveld 408576698