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

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

Issue 11971017: Move ugly hack out of the loop. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/dartgenerator.py
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index ac399eb3c160dfe6b291784ec1daee7cb5777cd5..5fb409c4ea24e00c54f44a40ae0da03b09e39db9 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -148,16 +148,16 @@ class DartGenerator(object):
else:
database.DeleteInterface(interface.id)
- # Ugly temporary hack
- websocket_interface = database.GetInterface('WebSocket')
- def make_object(**fields):
- o = type('Anon', (object,), {})()
- for k, v in fields.items(): setattr(o, k, v)
- o.ext_attrs = {}
- return o
- arg = make_object(id = 'url', type = make_object(id = 'DOMString'))
- websocket_interface.ext_attrs['Constructor'] = make_object(arguments = [arg])
- websocket_interface.ext_attrs['CustomConstructor'] = True
+ # Ugly temporary hack
+ websocket_interface = database.GetInterface('WebSocket')
+ def make_object(**fields):
+ o = type('Anon', (object,), {})()
+ for k, v in fields.items(): setattr(o, k, v)
+ o.ext_attrs = {}
+ return o
+ arg = make_object(id = 'url', type = make_object(id = 'DOMString'))
+ websocket_interface.ext_attrs['Constructor'] = make_object(arguments = [arg])
+ websocket_interface.ext_attrs['CustomConstructor'] = True
self.FilterMembersWithUnidentifiedTypes(database)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698