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

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

Issue 1525423002: Handle malformed elements in onElementResolved. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years 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 | tests/compiler/dart2js/analyze_all_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 5bd42a15262408b0890760448a291889624241d7..05b00d18ac7597b2ca7f308ba7d8f447340387ea 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2425,6 +2425,12 @@ class JavaScriptBackend extends Backend {
}
void onElementResolved(Element element, TreeElements elements) {
+ if (element.isMalformed) {
+ // Elements that are marker as malformed during parsing or resolution
+ // might be registered here. These should just be ignored.
+ return;
+ }
+
if ((element.isFunction || element.isConstructor) &&
annotations.noInline(element)) {
inlineCache.markAsNonInlinable(element);
« no previous file with comments | « no previous file | tests/compiler/dart2js/analyze_all_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698