Chromium Code Reviews| Index: Source/bindings/scripts/v8_types.py |
| diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
| index df05d16f21b0682b0f6c21204573820cc97882da..dda2ff0cabf1f4377b2c4bdf13ce392e63368892 100644 |
| --- a/Source/bindings/scripts/v8_types.py |
| +++ b/Source/bindings/scripts/v8_types.py |
| @@ -399,6 +399,9 @@ def add_includes_for_interface(interface_name): |
| def impl_should_use_nullable_container(idl_type): |
| + if idl_type.name == 'Object': |
| + # We use ScriptValue for Objects in dictionary impls. |
| + return False |
| return not(idl_type.cpp_type_has_null_value) |
|
haraken
2014/09/24 04:08:56
Can't we make idl_type.cpp_type_has_null_value ret
bashi
2014/09/24 05:28:55
Done.
|
| IdlTypeBase.impl_should_use_nullable_container = property( |
| @@ -417,11 +420,14 @@ def impl_includes_for_type(idl_type, interfaces_info): |
| native_array_element_type, interfaces_info)) |
| includes_for_type.add('wtf/Vector.h') |
| + base_idl_type = idl_type.base_type |
| if idl_type.is_string_type: |
| includes_for_type.add('wtf/text/WTFString.h') |
| - if idl_type.base_type in interfaces_info: |
| + if base_idl_type in interfaces_info: |
| interface_info = interfaces_info[idl_type.base_type] |
| includes_for_type.add(interface_info['include_path']) |
| + if base_idl_type in INCLUDES_FOR_TYPE: |
| + includes_for_type.update(INCLUDES_FOR_TYPE[base_idl_type]) |
| return includes_for_type |
| IdlTypeBase.impl_includes_for_type = impl_includes_for_type |
| @@ -602,7 +608,7 @@ def preprocess_idl_type(idl_type): |
| if idl_type.is_enum: |
| # Enumerations are internally DOMStrings |
| return IdlType('DOMString') |
| - if (idl_type.name == 'Any' or idl_type.is_callback_function): |
| + if (idl_type.name in ['Any', 'Object'] or idl_type.is_callback_function): |
| return IdlType('ScriptValue') |
| return idl_type |