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.")); |
} |