Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Unified Diff: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart

Issue 1458313002: Fix for the js-interop crash Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | pkg/compiler/lib/src/ssa/builder.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index 65a49c860c848a5b5a6176a510fee0ef5095984a..84d66e8829b91d7826816c7bba57ff77a42d520d 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -120,6 +120,12 @@ class JsInteropAnalysis {
ClassElement classElement = element;
+ // If we have no indication that the type was instantiated, we don't need
+ // to generate code for it. Note that anonymous types are abstract and
+ // contain only a factory constructor, so they are marked in the world
+ // as being implemented rather than being instantiated.
+ if (!backend.compiler.world.isImplemented(classElement)) return;
+
if (!classElement
.implementsInterface(helpers.jsJavaScriptObjectClass)) {
backend.reporter.reportErrorMessage(classElement,
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | pkg/compiler/lib/src/ssa/builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698