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

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

Issue 2625343002: Fix metadata processing (Closed)
Patch Set: Move comment Created 3 years, 11 months 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 | no next file » | 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 0dc1979039187ffa76be071bdb06acbb3cb87b99..af9cf061c56956c634141373f6362f98d5c94b2b 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2361,10 +2361,16 @@ class JavaScriptBackend extends Backend {
parameter.metadata.forEach(onMetadata);
}
}
- if (element.enclosingElement is ClassElement) {
- // Use [enclosingElement] instead of [enclosingClass] to ensure that
- // we process patch class metadata for patch and injected members.
- processElementMetadata(element.enclosingElement);
+ if (element.enclosingClass != null) {
+ // Only process library of top level fields/methods
+ // (and not for classes).
+ // TODO(johnniwinther): Fix this: We are missing some metadata on
+ // libraries (example: in co19/Language/Metadata/before_export_t01).
+ if (element.enclosingElement is ClassElement) {
+ // Use [enclosingElement] instead of [enclosingClass] to ensure that
+ // we process patch class metadata for patch and injected members.
+ processElementMetadata(element.enclosingElement);
+ }
} else {
processLibraryMetadata(element.library);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698