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

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: rebased 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') | 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 673d9646d899626c5f1a9f658986dee64ff5ed08..f703c9c3d5a7b2cd8108f7d83db43f5e379b1bd5 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -308,15 +308,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.is_string_type 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698