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

Unified Diff: lib/dom/scripts/databasebuilder.py

Issue 10521002: Use WebKit IDL syntax for declaring optional parameters in dart.idl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « lib/dom/idl/dart/dart.idl ('k') | lib/dom/scripts/idlnode.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/databasebuilder.py
diff --git a/lib/dom/scripts/databasebuilder.py b/lib/dom/scripts/databasebuilder.py
index 0dc2ce18bd074d52b078a3398f585e84ee1343b0..9ad31bf0783f4c0e29c4940d1717f78a9868b426 100755
--- a/lib/dom/scripts/databasebuilder.py
+++ b/lib/dom/scripts/databasebuilder.py
@@ -129,15 +129,15 @@ class DatabaseBuilder(object):
in_optional_whitelist = (interface.id, op.id, argument.id) in optional_argument_whitelist
if in_optional_whitelist or set(['Optional', 'Callback']).issubset(argument.ext_attrs.keys()):
argument.is_optional = True
+ argument.ext_attrs['Optional'] = None
argument.ext_attrs['RequiredCppParameter'] = None
continue
- if argument.is_optional:
- if 'Optional' in argument.ext_attrs:
- optional_value = argument.ext_attrs['Optional']
- if optional_value:
- argument.is_optional = False
- del argument.ext_attrs['Optional']
+ if 'Optional' in argument.ext_attrs:
+ optional_value = argument.ext_attrs['Optional']
+ if optional_value:
+ argument.is_optional = False
+ del argument.ext_attrs['Optional']
# split operations with optional args into multiple operations
new_ops = []
« no previous file with comments | « lib/dom/idl/dart/dart.idl ('k') | lib/dom/scripts/idlnode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698