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

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

Issue 2619243002: Make .enclosingClass always return the declaration (Closed)
Patch Set: Updated cf. comments 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
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 95cd78e7fb3f04afeb61c3516fa74729956eb252..ccc9a18e2ef871b5b4f3539632497635133b2d8c 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2309,7 +2309,7 @@ class JavaScriptBackend extends Backend {
StagedWorldImpactBuilder impactBuilder = enqueuer.isResolutionQueue
? constantImpactsForResolution
- : constantImpactsForResolution;
+ : constantImpactsForCodegen;
if (enqueuer.isResolutionQueue && !enqueuer.queueIsClosed) {
/// Register the constant value of [metadata] as live in resolution.
void registerMetadataConstant(MetadataAnnotation metadata) {
@@ -2360,8 +2360,10 @@ class JavaScriptBackend extends Backend {
parameter.metadata.forEach(onMetadata);
}
}
- if (element.enclosingClass != null) {
- processElementMetadata(element.enclosingClass);
+ 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 | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/resolution/constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698