Index: sdk/lib/_internal/lib/isolate_helper.dart |
diff --git a/sdk/lib/_internal/lib/isolate_helper.dart b/sdk/lib/_internal/lib/isolate_helper.dart |
index 9245d07bae5e092ba92b947cac2b4a7c7e35e7bf..85d9f2bd0442e559dfcd67a695fed23a543e3243 100644 |
--- a/sdk/lib/_internal/lib/isolate_helper.dart |
+++ b/sdk/lib/_internal/lib/isolate_helper.dart |
@@ -226,9 +226,9 @@ class _Manager { |
void _nativeInitWorkerMessageHandler() { |
var function = JS('', |
- "function (e) { #(#, e); }", |
- DART_CLOSURE_TO_JS(IsolateNatives._processWorkerMessage), |
- mainManager); |
+ "(function (f, a) { return function (e) { f(a, e); }})(#, #)", |
floitsch
2014/04/22 16:11:18
I would prefer this in a separate CL.
|
+ DART_CLOSURE_TO_JS(IsolateNatives._processWorkerMessage), |
+ mainManager); |
JS("void", r"#.onmessage = #", globalThis, function); |
// We define dartPrint so that the implementation of the Dart |
// print method knows what to call. |
@@ -953,7 +953,7 @@ class IsolateNatives { |
final worker = JS('var', 'new Worker(#)', uri); |
var processWorkerMessageTrampoline = |
- JS('', 'function(e) { #(#, e); }', |
+ JS('', "(function (f, a) { return function (e) { f(a, e); }})(#, #)", |
floitsch
2014/04/22 16:11:18
ditto.
|
DART_CLOSURE_TO_JS(_processWorkerMessage), |
worker); |
JS('void', '#.onmessage = #', worker, processWorkerMessageTrampoline); |