| Index: tools/dom/scripts/generator.py
|
| diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
|
| index 6163f5347266fbb25f98002d7d43ce88a0664e19..d8c213b19cc6c663d0e18064bc07490fa98cf5e0 100644
|
| --- a/tools/dom/scripts/generator.py
|
| +++ b/tools/dom/scripts/generator.py
|
| @@ -143,12 +143,12 @@ def GetCallbackInfo(interface):
|
| def _BuildArguments(args, interface, constructor=False):
|
| def IsOptional(argument):
|
| if 'Callback' in argument.ext_attrs:
|
| - # Callbacks with 'Optional=XXX' are treated as optional arguments.
|
| - return 'Optional' in argument.ext_attrs
|
| + # Optional callbacks arguments are treated as optional arguments.
|
| + return argument.optional
|
| if constructor:
|
| - # FIXME: Constructors with 'Optional=XXX' shouldn't be treated as
|
| + # FIXME: Optional constructors arguments should not be treated as
|
| # optional arguments.
|
| - return 'Optional' in argument.ext_attrs
|
| + return argument.optional
|
| return False
|
|
|
| # Given a list of overloaded arguments, choose a suitable name.
|
| @@ -182,8 +182,7 @@ def _BuildArguments(args, interface, constructor=False):
|
| return result
|
|
|
| def IsOptional(argument):
|
| - return ('Optional' in argument.ext_attrs and
|
| - argument.ext_attrs['Optional'] == None)
|
| + return argument.optional and ('Default' not in argument.ext_attrs)
|
|
|
| def AnalyzeOperation(interface, operations):
|
| """Makes operation calling convention decision for a set of overloads.
|
|
|