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

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

Issue 1134073002: IDL: Make idl_type.is_wrapper_type false for callback interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_types.py
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
index c02da3f5a397ff05b220c0ca3d2bd5449012cdeb..e4b45c79266e229ef91bd212ca783539a7d67883 100644
--- a/Source/bindings/scripts/v8_types.py
+++ b/Source/bindings/scripts/v8_types.py
@@ -80,6 +80,7 @@ IdlType.is_typed_array = property(
IdlType.is_wrapper_type = property(
lambda self: (self.is_interface_type and
+ not self.is_callback_interface and
self.base_type not in NON_WRAPPER_TYPES))
@@ -610,11 +611,6 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl
this_cpp_type = idl_type.cpp_type_args(extended_attributes=extended_attributes, raw_type=True)
idl_type = idl_type.preprocessed_type
- if idl_type.base_type in ('void', 'object', 'EventHandler', 'EventListener'):
- return {
- 'error_message': 'no V8 -> C++ conversion for IDL type: %s' % idl_type.name
- }
-
cpp_value = v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name, index, isolate, restricted_float=restricted_float)
# Optional expression that returns a value to be assigned to the local variable.
@@ -649,7 +645,9 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl
else:
check_expression = '!%s.prepare()' % variable_name
elif not idl_type.v8_conversion_is_trivial:
- raise Exception('unclassified V8 -> C++ conversion for IDL type: %s' % idl_type.name)
+ return {
+ 'error_message': 'no V8 -> C++ conversion for IDL type: %s' % idl_type.name
+ }
else:
assign_expression = cpp_value
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698