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

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

Issue 1052693004: move => bind this workaround to js_ast (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_isolate_helper.js
diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js
index 9f50c3de765706e87b3eb43a047dff49c5d4b712..f83d04c15a228f511bd968950575054d2ef125e6 100644
--- a/lib/runtime/dart/_isolate_helper.js
+++ b/lib/runtime/dart/_isolate_helper.js
@@ -478,7 +478,7 @@ var _isolate_helper;
let _addRegistration = Symbol('_addRegistration');
class _IsolateContext extends core.Object {
_IsolateContext() {
- this.id = ((x$) => exports._globalState.nextIsolateId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextIsolateId);
+ this.id = ((x$) => exports._globalState.nextIsolateId = dart.notNull(x$) + 1, x$)(exports._globalState.nextIsolateId);
this.ports = new (core.Map$(core.int, RawReceivePortImpl))();
this.weakPorts = new (core.Set$(core.int))();
this.isolateStatics = _foreign_helper.JS_CREATE_ISOLATE();
@@ -1005,17 +1005,17 @@ var _isolate_helper;
uri = ".js";
let port = new isolate.ReceivePort();
let completer = dart.as(new async.Completer(), async.Completer$(core.List));
- port.first.then(((msg) => {
+ port.first.then((msg) => {
if (dart.equals(dart.dindex(msg, 0), _SPAWNED_SIGNAL)) {
completer.complete(msg);
} else {
dart.assert(dart.equals(dart.dindex(msg, 0), _SPAWN_FAILED_SIGNAL));
completer.completeError(dart.dindex(msg, 1));
}
- }).bind(this));
+ });
let signalReply = port.sendPort;
if (dart.notNull(exports._globalState.useWorkers) && !dart.notNull(isLight)) {
- IsolateNatives[_startWorker](functionName, uri, args, message, isSpawnUri, startPaused, signalReply, ((message) => completer.completeError(message)).bind(this));
+ IsolateNatives[_startWorker](functionName, uri, args, message, isSpawnUri, startPaused, signalReply, (message) => completer.completeError(message));
} else {
IsolateNatives[_startNonWorker](functionName, uri, args, message, isSpawnUri, startPaused, signalReply);
}
@@ -1087,7 +1087,7 @@ var _isolate_helper;
};
}(_foreign_helper.DART_CLOSURE_TO_JS(IsolateNatives[_processWorkerMessage]), worker);
worker.onmessage = processWorkerMessageTrampoline;
- let workerId = ((x$) => exports._globalState.nextManagerId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextManagerId);
+ let workerId = ((x$) => exports._globalState.nextManagerId = dart.notNull(x$) + 1, x$)(exports._globalState.nextManagerId);
IsolateNatives.workerIds.set(worker, workerId);
exports._globalState.managers.set(workerId, worker);
worker.postMessage(_serializeMessage(dart.map({command: 'start', id: workerId, replyTo: _serializeMessage(replyPort), args: args, msg: _serializeMessage(message), isSpawnUri: isSpawnUri, startPaused: startPaused, functionName: functionName})));
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698