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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart

Issue 2620123002: Fix for 27467 - dart2js error with re-entrant static initializer (Closed)
Patch Set: 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 | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 3d8ea6ccb2fd595e44aedfbe34723a34a92d08cb..6b3a226647e516e841de90b5f0fa4540f319df43 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -939,10 +939,14 @@ class Emitter implements js_emitter.Emitter {
prototype[getterName] = function () {
var result = this[fieldName];
+ if (result == sentinelInProgress) {
+ // In minified mode, static name is not provided, so fall back
+ // to the minified fieldName.
+ #cyclicThrow(staticName || fieldName);
+ }
try {
if (result === sentinelUndefined) {
this[fieldName] = sentinelInProgress;
-
try {
result = this[fieldName] = lazyValue();
} finally {
@@ -951,13 +955,7 @@ class Emitter implements js_emitter.Emitter {
if (result === sentinelUndefined)
this[fieldName] = null;
}
- } else {
- if (result === sentinelInProgress)
- // In minified mode, static name is not provided, so fall
- // back to the minified fieldName.
- #cyclicThrow(staticName || fieldName);
}
-
return result;
} finally {
this[getterName] = function() { return this[fieldName]; };
« no previous file with comments | « no previous file | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698