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

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

Issue 409373002: IDL: Binding code generation for dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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: Source/bindings/scripts/v8_types.py
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
index 0a070f8074c00ca2bed6b7a4c1d70b52bf6b4bee..3d543a76cb0951013b1ee9705f7a8839bdb53053 100644
--- a/Source/bindings/scripts/v8_types.py
+++ b/Source/bindings/scripts/v8_types.py
@@ -458,6 +458,8 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, index, isolat
cpp_expression_format = (
'{v8_value}->Is{idl_type}() ? '
'V8{idl_type}::toNative(v8::Handle<v8::{idl_type}>::Cast({v8_value})) : 0')
+ elif idl_type.is_dictionary:
+ cpp_expression_format = 'V8{idl_type}::toNative({isoalte}, {v8_value})'
else:
cpp_expression_format = (
'V8{idl_type}::toNativeWithTypeCheck({isolate}, {v8_value})')

Powered by Google App Engine
This is Rietveld 408576698