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

Unified Diff: tools/dom/scripts/generator.py

Issue 13843029: WebKit IDL roll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/idlsync.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/idlsync.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698