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

Unified Diff: test/generated_sdk/lib/_internal/compiler/js_lib/isolate_helper.dart

Issue 1131143002: Angular workarounds (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase on latest Created 5 years, 7 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
Index: test/generated_sdk/lib/_internal/compiler/js_lib/isolate_helper.dart
diff --git a/test/generated_sdk/lib/_internal/compiler/js_lib/isolate_helper.dart b/test/generated_sdk/lib/_internal/compiler/js_lib/isolate_helper.dart
index 9936e00fbac79a150c84786d949cb06e388b707e..cc5072692b804ead6fd5cb3daed267bcf9158332 100644
--- a/test/generated_sdk/lib/_internal/compiler/js_lib/isolate_helper.dart
+++ b/test/generated_sdk/lib/_internal/compiler/js_lib/isolate_helper.dart
@@ -157,10 +157,14 @@ void startRootIsolate(entry, args) {
// TODO(eub, sigmund): move the "manager" to be entirely in JS.
// Running any Dart code outside the context of an isolate gives it
// the chance to break the isolate abstraction.
-_Manager get _globalState => JS("_Manager", "init.globalState");
+// TODO(vsm): This was changed from init.globalState.
+// See: https://github.com/dart-lang/dev_compiler/issues/164
+_Manager get _globalState => JS("_Manager", "dart.globalState");
set _globalState(_Manager val) {
- JS("void", "init.globalState = #", val);
+ // TODO(vsm): This was changed from init.globalState.
+ // See: https://github.com/dart-lang/dev_compiler/issues/164
+ JS("void", "dart.globalState = #", val);
}
/** State associated with the current manager. See [globalState]. */
@@ -648,10 +652,12 @@ class _EventLoop {
void _runHelper() {
if (globalWindow != null) {
// Run each iteration from the browser's top event loop.
- void next() {
+ // TODO(vsm): Revert to original pattern.
+ // See: https://github.com/dart-lang/dev_compiler/issues/177
+ Function next = () {
if (!runIteration()) return;
Timer.run(next);
- }
+ };
next();
} else {
// Run synchronously until no more iterations are available.
@@ -751,7 +757,9 @@ class IsolateNatives {
* JavaScript workers.
*/
static String computeThisScript() {
- var currentScript = JS_EMBEDDED_GLOBAL('', CURRENT_SCRIPT);
+ // See: https://github.com/dart-lang/dev_compiler/issues/164
+ // var currentScript = JS_EMBEDDED_GLOBAL('', CURRENT_SCRIPT);
+ var currentScript = JS('var', 'document.currentScript');
if (currentScript != null) {
return JS('String', 'String(#.src)', currentScript);
}

Powered by Google App Engine
This is Rietveld 408576698