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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_interface.py

Issue 1476863003: bindings: Ignores the last undefined arguments when counting the args. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 5 years, 1 month 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: third_party/WebKit/Source/bindings/scripts/v8_interface.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
index 2ae2d223c00b4f691dd6880b1ab95e35f1aab117..dbfaf42eb4e608491a8a09dd5daac3acacc2ac18 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -1220,9 +1220,12 @@ def constructor_context(interface, constructor):
is_constructor_raises_exception = \
interface.extended_attributes.get('RaisesException') == 'Constructor'
+ argument_contexts = [
+ v8_methods.argument_context(interface, constructor, argument, index)
+ for index, argument in enumerate(constructor.arguments)]
+
return {
- 'arguments': [v8_methods.argument_context(interface, constructor, argument, index)
- for index, argument in enumerate(constructor.arguments)],
+ 'arguments': argument_contexts,
'cpp_type': cpp_template_type(
cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)),
cpp_name(interface)),
@@ -1233,6 +1236,9 @@ def constructor_context(interface, constructor):
any(argument for argument in constructor.arguments
if argument.idl_type.name == 'SerializedScriptValue' or
argument.idl_type.v8_conversion_needs_exception_state),
+ 'has_optional_argument_without_default_value':
+ any(True for argument_context in argument_contexts
+ if argument_context['is_optional_without_default_value']),
'is_call_with_document':
# [ConstructorCallWith=Document]
has_extended_attribute_value(interface,

Powered by Google App Engine
This is Rietveld 408576698