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

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

Issue 9122019: Avoid generating "foo.continue()" because JSCompiler chokes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « client/dom/generated/wrapping_dom.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/dartgenerator.py
diff --git a/client/dom/scripts/dartgenerator.py b/client/dom/scripts/dartgenerator.py
index 243e3fa528296615d79a1859e7fe3e8cc84a9175..1f23922a826707dee58baf819851fa0972ed1e7f 100755
--- a/client/dom/scripts/dartgenerator.py
+++ b/client/dom/scripts/dartgenerator.py
@@ -1640,18 +1640,22 @@ class WrappingInterfaceGenerator(object):
PARAMS=', '.join(['_this'] + arg_names),
ARGS=', '.join(['_this.$dom'] + unwrap_args))
else:
+ if info.js_name in ['delete', 'continue']:
+ access = "['%s']" % info.js_name
+ else:
+ access = ".%s" % info.js_name
self._js_code.Emit(
'\n'
'function native_$(CLASS)_$(NATIVENAME)($PARAMS) {\n'
' try {\n'
- ' return __dom_wrap(_this.$dom.$JSNAME($ARGS));\n'
+ ' return __dom_wrap(_this.$dom$ACCESS($ARGS));\n'
' } catch (e) {\n'
' throw __dom_wrap_exception(e);\n'
' }\n'
'}\n',
CLASS=self._class_name,
NAME=info.name,
- JSNAME=info.js_name,
+ ACCESS=access,
NATIVENAME=native_name,
PARAMS=', '.join(['_this'] + arg_names),
ARGS=', '.join(unwrap_args))
« no previous file with comments | « client/dom/generated/wrapping_dom.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698