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

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

Issue 335113002: IDL: Support argument default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | Source/bindings/templates/methods.cpp » ('j') | Source/bindings/tests/idls/TestObject.idl » ('J')
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 dfb8460f0c3f6d8bc594efa8f0b424607978d6d5..6f8378d24fd8ec381513a5af52b3d70b4707b6e9 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -301,14 +301,7 @@ def v8_value_to_local_cpp_value(argument, index):
name = argument.name
if argument.is_variadic:
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
- argument.default_value and argument.default_value.is_null):
- v8_value = 'argumentOrNull(info, %s)' % index
- else:
- v8_value = 'info[%s]' % index
- return idl_type.v8_value_to_local_cpp_value(extended_attributes, v8_value,
+ return idl_type.v8_value_to_local_cpp_value(extended_attributes, 'info[%s]' % index,
name, index=index, declare_variable=False)
« no previous file with comments | « no previous file | Source/bindings/templates/methods.cpp » ('j') | Source/bindings/tests/idls/TestObject.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698