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

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

Issue 1263593003: restore arrow function bind this workaround (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 | 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/_isolate_helper.js
diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js
index 004df072bfe3f3d764c0b354274f9eb8b5a720d5..92560393f32ffcf0490bcb433d3d3c168624cdea 100644
--- a/lib/runtime/dart/_isolate_helper.js
+++ b/lib/runtime/dart/_isolate_helper.js
@@ -1277,11 +1277,11 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
isolate.handleControlMessage(msg);
return;
}
- exports._globalState.topEventLoop.enqueue(isolate, dart.fn(() => {
+ exports._globalState.topEventLoop.enqueue(isolate, dart.fn((() => {
if (!dart.notNull(this[_receivePort][_isClosed])) {
this[_receivePort][_add](msg);
}
- }), `receive ${message}`);
+ }).bind(this)), `receive ${message}`);
}
['=='](other) {
return dart.is(other, _NativeJsSendPort) && dart.equals(this[_receivePort], dart.dload(other, _receivePort));
@@ -1471,9 +1471,9 @@ dart_library.library('dart/_isolate_helper', null, /* Imports */[
this[_handle] = null;
if (dart.notNull(hasTimer())) {
enterJsAsync();
- this[_handle] = self.setInterval(dart.fn(() => {
+ this[_handle] = self.setInterval(dart.fn((() => {
callback(this);
- }), milliseconds);
+ }).bind(this)), milliseconds);
} else {
dart.throw(new core.UnsupportedError("Periodic timer."));
}
« no previous file with comments | « no previous file | lib/runtime/dart/async.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698