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

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

Issue 8879044: Work-around Frog codegen bug where Window is derived from native DOMWindow. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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/src/frog/Console.dart ('k') | client/dom/scripts/template_frog_dom.darttemplate » ('j') | 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 86e1ccec092ef9559a2e12a70e2d3a4a6696ae42..556e1dd8f804733b011cecaafaf1b784ae0c858c 100755
--- a/client/dom/scripts/dartgenerator.py
+++ b/client/dom/scripts/dartgenerator.py
@@ -121,10 +121,16 @@ _custom_getters = set([
# Custom native specs for the Frog dom.
#
_frog_dom_custom_native_specs = {
- 'Console': '=console', # Decorate the singleton Console object.
- 'DOMWindow': '@*DOMWindow', # DOMWindow aliased with global scope.
+ # Decorate the singleton Console object, if present (workers do not have a
+ # console).
+ 'Console': "=(typeof console == 'undefined' ? {} : console)",
- # Temporary hack: make these not be 'hidden'. Will not work on IE9.
+ # DOMWindow aliased with global scope.
+ 'DOMWindow': '@*DOMWindow',
+
+ # Temporary hack: make these not be 'hidden', so that static methods can be
+ # put on them. Frog should be fixed to generate working code for static
+ # methods on hidden classes. Meantime, programs will not work on IE9.
'Float32Array': 'Float32Array',
'Float64Array': 'Float64Array',
'Int8Array': 'Int8Array',
« no previous file with comments | « client/dom/generated/src/frog/Console.dart ('k') | client/dom/scripts/template_frog_dom.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698