Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index d116ffa41822861da917b2b67ab96c90f56666b2..5b7eac40f1914cc62ba2ce2cb19bb3944aaf53ee 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -728,6 +728,9 @@ def v8_conversion_type(idl_type, extended_attributes): |
raise 'Unrecognized TreatReturnedNullStringAs value: "%s"' % treat_returned_null_string_as |
if idl_type.is_basic_type or base_idl_type == 'ScriptValue': |
return base_idl_type |
+ # Generic dictionary type |
+ if base_idl_type == 'Dictionary': |
+ return 'Dictionary' |
# Data type with potential additional includes |
add_includes_for_type(idl_type) |
@@ -767,6 +770,8 @@ V8_SET_RETURN_VALUE = { |
'DOMWrapperForMainWorld': 'v8SetReturnValueForMainWorld(info, WTF::getPtr({cpp_value}))', |
'DOMWrapperFast': 'v8SetReturnValueFast(info, WTF::getPtr({cpp_value}), {script_wrappable})', |
'DOMWrapperDefault': 'v8SetReturnValue(info, {cpp_value})', |
+ # Generic dictionary type |
+ 'Dictionary': 'v8SetReturnValue(info, {cpp_value})', |
# Union types or dictionaries |
'DictionaryOrUnion': 'v8SetReturnValue(info, result)', |
} |
@@ -824,6 +829,7 @@ CPP_VALUE_TO_V8_VALUE = { |
'StringOrNull': '{cpp_value}.isNull() ? v8::Handle<v8::Value>(v8::Null({isolate})) : v8String({isolate}, {cpp_value})', |
'StringOrUndefined': '{cpp_value}.isNull() ? v8Undefined() : v8String({isolate}, {cpp_value})', |
# Special cases |
+ 'Dictionary': '{cpp_value}.v8Value()', |
'EventHandler': '{cpp_value} ? v8::Handle<v8::Value>(V8AbstractEventListener::cast({cpp_value})->getListenerObject(impl->executionContext())) : v8::Handle<v8::Value>(v8::Null({isolate}))', |
'ScriptValue': '{cpp_value}.v8Value()', |
'SerializedScriptValue': '{cpp_value} ? {cpp_value}->deserialize() : v8::Handle<v8::Value>(v8::Null({isolate}))', |