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

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

Issue 309553002: Add ByteString support to IDL bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add [Default=NullString] support Created 6 years, 6 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_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index b50ba604efeda5d30d6904c14ab2371aec03b82c..2a7fc9fac1ef359caf2f05ad2d60ac45a8913c3a 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -119,7 +119,7 @@ def generate_method(interface, method):
is_raises_exception or
is_check_security_for_frame or
any(argument for argument in arguments
- if argument.idl_type.name == 'SerializedScriptValue' or
+ if argument.idl_type.name in ('ByteString', 'SerializedScriptValue') or
argument.idl_type.is_integer_type),
'is_call_with_execution_context': has_extended_attribute_value(method, 'CallWith', 'ExecutionContext'),
'is_call_with_script_arguments': is_call_with_script_arguments,
@@ -286,7 +286,7 @@ def v8_value_to_local_cpp_value(argument, index):
if argument.is_variadic:
return v8_value_to_local_cpp_variadic_value(argument, index)
# [Default=NullString]
- if (argument.is_optional and idl_type.name == 'String' and
+ if (argument.is_optional and idl_type.name in ('String', 'ByteString') and
extended_attributes.get('Default') == 'NullString'):
v8_value = 'argumentOrNull(info, %s)' % index
else:

Powered by Google App Engine
This is Rietveld 408576698