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

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

Issue 313993002: Bindings: Add ScalarValueString support (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback 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
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 9538b2c26da21129407eb2dc4dfc1ac88a436a1f..11486410b0fdec1d800890519d5f5791f8587455 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -131,7 +131,9 @@ 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 in ('ByteString', 'SerializedScriptValue') or
+ if argument.idl_type.name in ('ByteString',
+ 'ScalarValueString',
+ 'SerializedScriptValue') or
argument.idl_type.is_integer_type),
'idl_type': idl_type.base_type,
'is_call_with_execution_context': has_extended_attribute_value(method, 'CallWith', 'ExecutionContext'),
@@ -310,7 +312,8 @@ def v8_value_to_local_cpp_value(argument, index):
return v8_value_to_local_cpp_variadic_value(argument, index)
# FIXME: This special way of handling string arguments with null defaults
# can go away once we fully support default values.
- if (argument.is_optional and idl_type.name in ('String', 'ByteString') and
+ if (argument.is_optional and
+ idl_type.name in ('String', 'ByteString', 'ScalarValueString') and
argument.default_value and argument.default_value.is_null):
v8_value = 'argumentOrNull(info, %s)' % index
else:
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698