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

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

Issue 2619243002: Make .enclosingClass always return the declaration (Closed)
Patch Set: Add 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
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..2485a07319781491eefde4999e45fa5241788466 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;
Johnni Winther 2017/01/09 12:58:03 Latent error found while debugging the problem in
Siggi Cherem (dart-lang) 2017/01/11 19:24:01 ouch
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] to process patch class metadata for patch
Siggi Cherem (dart-lang) 2017/01/11 19:24:02 nit: maybe highlight also that you are not using e
Johnni Winther 2017/01/12 09:56:56 Done.
+ // and injected members.
+ processElementMetadata(element.enclosingElement);
} else {
processLibraryMetadata(element.library);
}

Powered by Google App Engine
This is Rietveld 408576698