Index: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart |
diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart |
index 24dc706aa9a34a264f84eec26f52439645f080e6..3d949ce68fdd4a4e2a80125c7dbf848f3b1777af 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart |
@@ -9,9 +9,10 @@ import 'dart:_foreign_helper' show DART_CLOSURE_TO_JS, |
JS, |
JS_CALL_IN_ISOLATE, |
JS_CURRENT_ISOLATE, |
+ JS_CURRENT_ISOLATE_CONTEXT, |
JS_DART_OBJECT_CONSTRUCTOR, |
- JS_OPERATOR_IS_PREFIX, |
JS_OPERATOR_AS_PREFIX, |
+ JS_OPERATOR_IS_PREFIX, |
RAW_DART_FUNCTION_REF; |
import 'dart:_interceptors'; |
import "dart:_collection-dev" as _symbol_dev; |
@@ -588,8 +589,7 @@ class Primitives { |
if (JS('bool', '# == "num"', int)) return const JSNumber(); |
if (JS('bool', '# == "bool"', int)) return const JSBool(); |
if (JS('bool', '# == "List"', int)) return const JSArray(); |
- // TODO(ahe): How to safely access $? |
- return JS('var', r'$[#]', className); |
+ return JS('var', '#[#]', JS_CURRENT_ISOLATE(), className); |
} |
static bool identicalImplementation(a, b) { |
@@ -944,7 +944,7 @@ convertDartClosureToJS(closure, int arity) { |
// Capture the current isolate now. Remember that "#" |
// in JS is simply textual substitution of compiled |
// expressions. |
- JS_CURRENT_ISOLATE(), |
+ JS_CURRENT_ISOLATE_CONTEXT(), |
DART_CLOSURE_TO_JS(invokeClosure)); |
JS('void', r'#.$identity = #', closure, function); |