| Index: tools/dom/scripts/generator.py
|
| diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
|
| index d8c213b19cc6c663d0e18064bc07490fa98cf5e0..517c66ac3c7e027739d31dc57591082918d084d1 100644
|
| --- a/tools/dom/scripts/generator.py
|
| +++ b/tools/dom/scripts/generator.py
|
| @@ -149,6 +149,8 @@ def _BuildArguments(args, interface, constructor=False):
|
| # FIXME: Optional constructors arguments should not be treated as
|
| # optional arguments.
|
| return argument.optional
|
| + if 'ForceOptional' in argument.ext_attrs:
|
| + return True
|
| return False
|
|
|
| # Given a list of overloaded arguments, choose a suitable name.
|
| @@ -182,7 +184,8 @@ def _BuildArguments(args, interface, constructor=False):
|
| return result
|
|
|
| def IsOptional(argument):
|
| - return argument.optional and ('Default' not in argument.ext_attrs)
|
| + return argument.optional and ('Default' not in argument.ext_attrs)\
|
| + or 'ForceOptional' in argument.ext_attrs
|
|
|
| def AnalyzeOperation(interface, operations):
|
| """Makes operation calling convention decision for a set of overloads.
|
|
|