Index: pkg/compiler/lib/src/inferrer/map_tracer.dart |
diff --git a/pkg/compiler/lib/src/inferrer/map_tracer.dart b/pkg/compiler/lib/src/inferrer/map_tracer.dart |
index b4cf7f019d0493dab0420de41ad75bd360c9df90..d1a8d0368794b149e9030e3501d08d11dd8d4230 100644 |
--- a/pkg/compiler/lib/src/inferrer/map_tracer.dart |
+++ b/pkg/compiler/lib/src/inferrer/map_tracer.dart |
@@ -67,7 +67,8 @@ class MapTracerVisitor extends TracerVisitor { |
visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { |
super.visitStaticCallSiteTypeInformation(info); |
Element called = info.calledElement; |
- if (compiler.backend.isForeign(compiler.commonElements, called) && |
+ if (compiler.backend |
+ .isForeign(inferrer.closedWorld.commonElements, called) && |
called.name == JavaScriptBackend.JS) { |
bailout('Used in JS ${info.call}'); |
} |