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

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

Issue 10821012: Autogenerate additional arguments for fanky methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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/scripts/dartdomgenerator.py ('k') | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/dartgenerator.py
diff --git a/lib/dom/scripts/dartgenerator.py b/lib/dom/scripts/dartgenerator.py
index 9cd855e059f1cb9ceb76ab05131fd660d577701e..941337fb24bacc246bb00bc6f94f51f8d7fa3c66 100755
--- a/lib/dom/scripts/dartgenerator.py
+++ b/lib/dom/scripts/dartgenerator.py
@@ -281,6 +281,13 @@ class DartGenerator(object):
('InterfaceType', ('ScopedName', 'EventTarget'))]
interface.parents.append(idlnode.IDLParentInterface(ast))
+ def AddMissingArguments(self, database):
+ ARG = idlnode.IDLArgument([('Type', ('ScopedName', 'Object')), ('Id', 'arg')])
+ for interface in database.GetInterfaces():
+ for operation in interface.operations:
+ if operation.ext_attrs.get('CallWith') == 'ScriptArguments|CallStack':
podivilov 2012/08/21 11:50:34 I thought we decided to avoid patching the databas
Anton Muhin 2012/08/21 12:03:37 The problem is I failed to find the best place for
+ operation.arguments.append(ARG)
+
# ------------------------------------------------------------------------------
class DummyImplementationSystem(systembase.System):
« no previous file with comments | « lib/dom/scripts/dartdomgenerator.py ('k') | lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698