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..c84def35d844573f446abbc87915e96ab32c8019 100644 |
| --- a/Source/bindings/scripts/v8_types.py |
| +++ b/Source/bindings/scripts/v8_types.py |
| @@ -417,11 +417,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 +605,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 |
| @@ -822,8 +825,9 @@ def cpp_type_has_null_value(idl_type): |
| # a null pointer. |
| # - Dictionary types represent null as a null pointer. They are garbage |
| # collected so their type is raw pointer. |
| + # - 'Object' type. We use ScriptValue for object type. |
| return (idl_type.is_string_type or idl_type.is_wrapper_type or |
| - idl_type.is_enum or idl_type.is_dictionary) |
| + idl_type.is_enum or idl_type.is_dictionary or idl_type.name == 'Object') |
|
Jens Widell
2014/09/24 05:48:58
For a nullable type, |idl_type.name| has a "OrNull
bashi
2014/09/24 07:19:30
Done. Thank you for pointing this out!
|
| IdlTypeBase.cpp_type_has_null_value = property(cpp_type_has_null_value) |