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

Unified Diff: lib/runtime/dart/_utils.js

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
« no previous file with comments | « no previous file | tool/input_sdk/private/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_utils.js
diff --git a/lib/runtime/dart/_utils.js b/lib/runtime/dart/_utils.js
index 5dee5707711013639c4a3883cdd68d16af19fe1a..9793464a006c386c98f89f1ed67c1996100212c2 100644
--- a/lib/runtime/dart/_utils.js
+++ b/lib/runtime/dart/_utils.js
@@ -68,7 +68,12 @@ dart_library.library('dart/_utils', null, /* Imports */[
}
function copyTheseProperties(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;
}
@@ -76,7 +81,7 @@ dart_library.library('dart/_utils', null, /* Imports */[
return copyTheseProperties(to, from, getOwnNamesAndSymbols(from));
}
function export_(to, from, show, hide) {
- if (show == void 0) {
+ if (show == void 0 || show.length == 0) {
vsm 2015/12/01 22:29:51 Note: show is undefined on a regular export and []
show = getOwnNamesAndSymbols(from);
}
if (hide != void 0) {
« no previous file with comments | « no previous file | tool/input_sdk/private/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698