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

Unified Diff: tool/input_sdk/private/utils.dart

Issue 1488273002: Fixes for exports (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years 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
« lib/runtime/dart/_utils.js ('K') | « lib/runtime/dart/_utils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/utils.dart
diff --git a/tool/input_sdk/private/utils.dart b/tool/input_sdk/private/utils.dart
index c4a81ea14de214abd707b0d1245558fa5624627d..636829e79270eb217e05ba4173fe06f5bd774b89 100644
--- a/tool/input_sdk/private/utils.dart
+++ b/tool/input_sdk/private/utils.dart
@@ -97,7 +97,12 @@ defineMemoizedGetter(obj, String name, getter) =>
copyTheseProperties(to, from, names) => JS('', '''((to, from, names) => {
for (let name of names) {
- defineProperty(to, name, getOwnPropertyDescriptor(from, name));
+ var desc = getOwnPropertyDescriptor(from, name);
+ if (desc != void 0) {
+ defineProperty(to, name, desc);
+ } else {
+ defineLazyProperty(to, name, () => from[name]);
+ }
}
return to;
})(#, #, #)''', to, from, names);
@@ -112,7 +117,7 @@ copyProperties(to, from) => JS('', '''((to, from) => {
// TODO(ochafik): Re-introduce a @JS annotation in the SDK (same as package:js)
// so that this is named 'export' in JavaScript.
export_(to, from, show, hide) => JS('', '''((to, from, show, hide) => {
- if (show == void 0) {
+ if (show == void 0 || show.length == 0) {
show = getOwnNamesAndSymbols(from);
}
if (hide != void 0) {
« lib/runtime/dart/_utils.js ('K') | « lib/runtime/dart/_utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698