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

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

Issue 1643523008: fix #43, remove => workaround (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_runtime.js
diff --git a/lib/runtime/dart/_runtime.js b/lib/runtime/dart/_runtime.js
index 2632bc822e9801766276a3298e74442ac529d782..777582d1ba760dda17a1b099c4f96fef9a7e9c13 100644
--- a/lib/runtime/dart/_runtime.js
+++ b/lib/runtime/dart/_runtime.js
@@ -274,9 +274,9 @@ dart_library.library('dart/_runtime', null, /* Imports */[
this.canceler = null;
this.iterator = generator(this, ...args)[Symbol.iterator]();
this.controller = getGenericClass(async.StreamController)(T).new({
- onListen: (() => this.scheduleGenerator()).bind(this),
- onResume: (() => this.onResume()).bind(this),
- onCancel: (() => this.onCancel()).bind(this)
+ onListen: () => this.scheduleGenerator(),
+ onResume: () => this.onResume(),
+ onCancel: () => this.onCancel()
});
}
onResume() {
@@ -305,7 +305,7 @@ dart_library.library('dart/_runtime', null, /* Imports */[
return;
}
this.isScheduled = true;
- async.scheduleMicrotask((() => this.runBody()).bind(this));
+ async.scheduleMicrotask(() => this.runBody());
}
runBody(opt_awaitValue) {
this.isScheduled = false;
@@ -330,8 +330,8 @@ dart_library.library('dart/_runtime', null, /* Imports */[
if (!instanceOf(future, getGenericClass(async.Future))) {
future = async.Future.value(future);
}
- return future.then((x => this.runBody(x)).bind(this), {
- onError: ((e, s) => this.throwError(e, s)).bind(this)
+ return future.then(x => this.runBody(x), {
+ onError: (e, s) => this.throwError(e, s)
});
}
add(event) {
@@ -344,11 +344,11 @@ dart_library.library('dart/_runtime', null, /* Imports */[
addStream(stream) {
if (!this.controller.hasListener) return true;
this.isAdding = true;
- this.controller.addStream(stream, {cancelOnError: false}).then((() => {
+ this.controller.addStream(stream, {cancelOnError: false}).then(() => {
this.isAdding = false;
this.scheduleGenerator();
- }).bind(this), {
- onError: ((e, s) => this.throwError(e, s)).bind(this)
+ }, {
+ onError: (e, s) => this.throwError(e, s)
});
}
throwError(error, stackTrace) {
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698