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/dev_compiler/test/codegen_expected/async_helper.js

Issue 2797443007: fix #29182, generate top level const fields lazily (Closed)
Patch Set: fix Created 3 years, 8 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/dev_compiler/test/codegen_expected/async_helper.js
diff --git a/pkg/dev_compiler/test/codegen_expected/async_helper.js b/pkg/dev_compiler/test/codegen_expected/async_helper.js
index c095edc865d68fd5ff70a5003e593f65b67c8278..d7d704544b8fe99db06e5954f3f2767360391705 100644
--- a/pkg/dev_compiler/test/codegen_expected/async_helper.js
+++ b/pkg/dev_compiler/test/codegen_expected/async_helper.js
@@ -10,10 +10,23 @@ define(['dart_sdk'], function(dart_sdk) {
let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [dart.dynamic])))();
let FnTovoid = () => (FnTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [VoidTodynamic()])))();
- async_helper._initialized = false;
+ dart.defineLazy(async_helper, {
+ get _initialized() {
+ return false;
+ },
+ set _initialized(_) {}
+ });
async_helper._Action0 = dart.typedef('_Action0', () => dart.functionType(dart.void, []));
- async_helper._onAsyncEnd = null;
- async_helper._asyncLevel = 0;
+ dart.defineLazy(async_helper, {
+ get _onAsyncEnd() {
+ return null;
+ },
+ set _onAsyncEnd(_) {},
+ get _asyncLevel() {
+ return 0;
+ },
+ set _asyncLevel(_) {}
+ });
async_helper._buildException = function(msg) {
return core.Exception.new(dart.str`Fatal: ${msg}. This is most likely a bug in your test.`);
};

Powered by Google App Engine
This is Rietveld 408576698