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

Unified Diff: dart/lib/compiler/implementation/js_backend/emitter.dart

Issue 10919098: Run dart2js tests unmodified in browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 | dart/pkg/unittest/test_controller.js » ('j') | dart/pkg/unittest/test_controller.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/js_backend/emitter.dart
diff --git a/dart/lib/compiler/implementation/js_backend/emitter.dart b/dart/lib/compiler/implementation/js_backend/emitter.dart
index f63d93fe81bac85692c270522be4a6cba4c5c4bb..132d3e973784202d930c63deff65493a88d7c6d7 100644
--- a/dart/lib/compiler/implementation/js_backend/emitter.dart
+++ b/dart/lib/compiler/implementation/js_backend/emitter.dart
@@ -1215,7 +1215,9 @@ $mainEnsureGetter
mainCall = '${namer.isolateAccess(main)}()';
}
buffer.add("""
-if (typeof document != 'undefined' && document.readyState != 'complete') {
+if (typeof dartMainRunner == 'function') {
kasperl 2012/09/06 10:29:29 Somehow it feels shaky to not wait until the docum
ahe 2012/09/08 13:32:32 Done.
+ dartMainRunner(function() { ${mainCall}; });
+} else if (typeof document != 'undefined' && document.readyState != 'complete') {
document.addEventListener('readystatechange', function () {
if (document.readyState == 'complete') {
${mainCall};
« no previous file with comments | « no previous file | dart/pkg/unittest/test_controller.js » ('j') | dart/pkg/unittest/test_controller.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698