Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart |
| =================================================================== |
| --- sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (revision 16024) |
| +++ sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (working copy) |
| @@ -1117,13 +1117,16 @@ |
| if (closure == null) return null; |
| var function = JS('var', r'#.$identity', closure); |
| if (JS('bool', r'!!#', function)) return function; |
| + // Fetch the current isolate in a local variable to prevent the |
|
kasperl
2012/12/13 08:45:12
Extend comment to mention that the current isolate
ngeoffray
2012/12/13 11:56:15
Done.
|
| + // compiler from inlining its use in the following JS expression. |
| + var currentIsolate = JS_CURRENT_ISOLATE(); |
| function = JS("var", r"""function() { |
| return #(#, #, #, arguments[0], arguments[1]); |
| }""", |
| DART_CLOSURE_TO_JS(invokeClosure), |
| closure, |
| - JS_CURRENT_ISOLATE(), |
| + currentIsolate, |
| arity); |
| JS('void', r'#.$identity = #', closure, function); |