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

Unified Diff: lib/runtime/dart/_isolate_helper.js

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: reverted let->const parasite change Created 4 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
Index: lib/runtime/dart/_isolate_helper.js
diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js
index 66f9733ac19daa0e2d20d8b771b7cd8b504b2fce..520359e249c3d4301204935efe5f34a00956f063 100644
--- a/lib/runtime/dart/_isolate_helper.js
+++ b/lib/runtime/dart/_isolate_helper.js
@@ -10,7 +10,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
], /* Lazy imports */[
'dart/_native_typed_data',
'dart/_js_embedded_names'
-], function(exports, dart, core, _interceptors, _js_helper, isolate, _foreign_helper, collection, async, _native_typed_data, _js_embedded_names) {
+], function(exports, dart, core, _interceptors, _js_helper, isolate, _foreign_helper, collection, $async, _native_typed_data, _js_embedded_names) {
'use strict';
let dartx = dart.dartx;
function _serializeMessage(message) {
@@ -830,7 +830,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
if (exports.globalWindow != null) {
const next = (function() {
if (!dart.notNull(this.runIteration())) return;
- async.Timer.run(next);
+ $async.Timer.run(next);
}).bind(this);
dart.fn(next);
next();
@@ -1069,7 +1069,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
uri = dart.notNull(uri) + ".js";
}
let port = isolate.ReceivePort.new();
- let completer = async.Completer$(core.List).new();
+ let completer = $async.Completer$(core.List).new();
port.first.then(dart.fn(msg => {
if (dart.equals(dart.dindex(msg, 0), _SPAWNED_SIGNAL)) {
completer.complete(msg);
@@ -1182,9 +1182,9 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
_getJSFunctionFromName: [dart.dynamic, [core.String]],
_getJSFunctionName: [core.String, [core.Function]],
_allocate: [dart.dynamic, [dart.dynamic]],
- spawnFunction: [async.Future$(core.List), [dart.functionType(dart.void, [dart.dynamic]), dart.dynamic, core.bool]],
- spawnUri: [async.Future$(core.List), [core.Uri, core.List$(core.String), dart.dynamic, core.bool]],
- spawn: [async.Future$(core.List), [core.String, core.String, core.List$(core.String), dart.dynamic, core.bool, core.bool, core.bool]],
+ spawnFunction: [$async.Future$(core.List), [dart.functionType(dart.void, [dart.dynamic]), dart.dynamic, core.bool]],
+ spawnUri: [$async.Future$(core.List), [core.Uri, core.List$(core.String), dart.dynamic, core.bool]],
+ spawn: [$async.Future$(core.List), [core.String, core.String, core.List$(core.String), dart.dynamic, core.bool, core.bool, core.bool]],
_startWorker: [dart.void, [core.String, core.String, core.List$(core.String), dart.dynamic, core.bool, core.bool, isolate.SendPort, dart.functionType(dart.void, [core.String])]],
_startNonWorker: [dart.void, [core.String, core.String, core.List$(core.String), dart.dynamic, core.bool, core.bool, isolate.SendPort]],
_startIsolate: [dart.void, [core.Function, core.List$(core.String), dart.dynamic, core.bool, core.bool, isolate.SendPort]],
@@ -1348,7 +1348,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
RawReceivePortImpl._nextFreeId = 1;
const _rawPort = Symbol('_rawPort');
const _controller = Symbol('_controller');
- class ReceivePortImpl extends async.Stream {
+ class ReceivePortImpl extends $async.Stream {
ReceivePortImpl() {
this.fromRawReceivePort(new RawReceivePortImpl(null));
}
@@ -1359,7 +1359,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
this[_rawPort] = rawPort;
this[_controller] = null;
super.Stream();
- this[_controller] = async.StreamController.new({onCancel: dart.bind(this, 'close'), sync: true});
+ this[_controller] = $async.StreamController.new({onCancel: dart.bind(this, 'close'), sync: true});
this[_rawPort].handler = dart.bind(this[_controller], 'add');
}
listen(onData, opts) {
@@ -1386,7 +1386,7 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
fromRawReceivePort: [ReceivePortImpl, [isolate.RawReceivePort]]
}),
methods: () => ({
- listen: [async.StreamSubscription, [dart.functionType(dart.void, [dart.dynamic])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnError: core.bool}],
+ listen: [$async.StreamSubscription, [dart.functionType(dart.void, [dart.dynamic])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnError: core.bool}],
close: [dart.void, []]
})
});
@@ -1455,12 +1455,12 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
return this[_handle] != null;
}
}
- TimerImpl[dart.implements] = () => [async.Timer];
+ TimerImpl[dart.implements] = () => [$async.Timer];
dart.defineNamedConstructor(TimerImpl, 'periodic');
dart.setSignature(TimerImpl, {
constructors: () => ({
TimerImpl: [TimerImpl, [core.int, dart.functionType(dart.void, [])]],
- periodic: [TimerImpl, [core.int, dart.functionType(dart.void, [async.Timer])]]
+ periodic: [TimerImpl, [core.int, dart.functionType(dart.void, [$async.Timer])]]
}),
methods: () => ({cancel: [dart.void, []]})
});

Powered by Google App Engine
This is Rietveld 408576698