Index: lib/compiler/implementation/js_backend/emitter.dart |
diff --git a/lib/compiler/implementation/js_backend/emitter.dart b/lib/compiler/implementation/js_backend/emitter.dart |
index 202bc87f53da9587a4bf3402877eed0b5e72f8f9..8787a62198b2cae1a95b047a3459e522e7097cd0 100644 |
--- a/lib/compiler/implementation/js_backend/emitter.dart |
+++ b/lib/compiler/implementation/js_backend/emitter.dart |
@@ -1442,11 +1442,11 @@ $classesCollector.$mangledName = {'': |
String invocationName = "${namer.closureInvocationName(selector)}"; |
mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess"; |
} |
- |
// TODO(ngeoffray): These globals are currently required by the isolate |
// library. They should be removed. |
String runtimeTypeCache = |
- compiler.enabledRuntimeType ? " context.runtimeTypeCache = {}\n" : ""; |
+ compiler.needsRuntimeTypeCache() ? " context.runtimeTypeCache = {}\n" |
+ : ""; |
buffer.add(""" |
var \$globalThis = $currentIsolate; |
@@ -1534,7 +1534,7 @@ if (typeof document != 'undefined' && document.readyState != 'complete') { |
// constants to be set up. |
emitStaticNonFinalFieldInitializations(mainBuffer); |
emitLazilyInitializedStaticFields(mainBuffer); |
- if (compiler.enabledRuntimeType && !compiler.hasIsolateSupport()) { |
+ if (compiler.needsRuntimeTypeCache() && !compiler.hasIsolateSupport()) { |
mainBuffer.add('$isolateProperties.runtimeTypeCache = {};\n'); |
} |