Index: third_party/WebKit/Source/bindings/scripts/v8_types.py |
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py |
index 939dda0dda62e1db8eefdff1b4f1db041fc12d17..04739d2e46ae0fb02a255a9e12b9a11cd68c2554 100644 |
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py |
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py |
@@ -770,14 +770,7 @@ def v8_conversion_type(idl_type, extended_attributes): |
if idl_type.is_string_type: |
if idl_type.is_nullable: |
return 'StringOrNull' |
- if 'TreatReturnedNullStringAs' not in extended_attributes: |
- return base_idl_type |
- treat_returned_null_string_as = extended_attributes['TreatReturnedNullStringAs'] |
- if treat_returned_null_string_as == 'Null': |
- return 'StringOrNull' |
- if treat_returned_null_string_as == 'Undefined': |
- return 'StringOrUndefined' |
- raise 'Unrecognized TreatReturnedNullStringAs value: "%s"' % treat_returned_null_string_as |
+ return base_idl_type |
if idl_type.is_basic_type or base_idl_type == 'ScriptValue': |
return base_idl_type |
# Generic dictionary type |
@@ -801,9 +794,7 @@ V8_SET_RETURN_VALUE = { |
'DOMString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', |
'ByteString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', |
'USVString': 'v8SetReturnValueString(info, {cpp_value}, info.GetIsolate())', |
- # [TreatReturnedNullStringAs] |
'StringOrNull': 'v8SetReturnValueStringOrNull(info, {cpp_value}, info.GetIsolate())', |
- 'StringOrUndefined': 'v8SetReturnValueStringOrUndefined(info, {cpp_value}, info.GetIsolate())', |
'void': '', |
# No special v8SetReturnValue* function (set value directly) |
'float': 'v8SetReturnValue(info, {cpp_value})', |
@@ -890,9 +881,7 @@ CPP_VALUE_TO_V8_VALUE = { |
'double': 'v8::Number::New({isolate}, {cpp_value})', |
'unrestricted double': 'v8::Number::New({isolate}, {cpp_value})', |
'void': 'v8Undefined()', |
- # [TreatReturnedNullStringAs] |
'StringOrNull': '{cpp_value}.isNull() ? v8::Local<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::Local<v8::Value>(V8AbstractEventListener::cast({cpp_value})->getListenerObject(impl->executionContext())) : v8::Local<v8::Value>(v8::Null({isolate}))', |