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

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

Issue 10789010: Do not treat callbacks with no handlers as interfaces. (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/frog/dom_frog.dart ('k') | lib/dom/scripts/generator.py » ('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 c5c4be55c09e730ddbdb066b82fea7b257559e7f..9d2fa53b299bc2585f74ebe2daac3a20eb359c5d 100755
--- a/lib/dom/scripts/dartgenerator.py
+++ b/lib/dom/scripts/dartgenerator.py
@@ -223,12 +223,15 @@ class DartGenerator(object):
interface_name, auxiliary_file))
continue
- info = RecognizeCallback(interface)
- if info:
- system.ProcessCallback(interface, info)
- else:
- if 'Callback' in interface.ext_attrs:
+ if 'Callback' in interface.ext_attrs:
+ handlers = [op for op in interface.operations if op.id == 'handleEvent']
+ if not handlers:
+ # FIXME: fix MutationCallback and assert(handlers).
_logger.info('Malformed callback: %s' % interface.id)
+ continue
+ info = AnalyzeOperation(interface, handlers)
+ system.ProcessCallback(interface, info)
+ else:
_logger.info('Generating %s' % interface.id)
system.ProcessInterface(interface)
« no previous file with comments | « lib/dom/frog/dom_frog.dart ('k') | lib/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698