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

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

Issue 1487213002: Special-case top-level final JS fields. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased 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 | « lib/runtime/dart/_js_mirrors.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/js.js
diff --git a/lib/runtime/dart/js.js b/lib/runtime/dart/js.js
index c4a9c9039cda5786b76ee10e4b6ef8c336aee362..0506aac91edc0bfcb9a6a829039fd15fe6ffbeb8 100644
--- a/lib/runtime/dart/js.js
+++ b/lib/runtime/dart/js.js
@@ -335,9 +335,9 @@ dart_library.library('dart/js', null, /* Imports */[
} else if (dart.is(o, JsObject)) {
return dart.dload(o, _jsObject);
} else if (dart.is(o, core.Function)) {
- return _putIfAbsent(exports._jsProxies, o, _wrapDartFunction);
+ return _putIfAbsent(_jsProxies, o, _wrapDartFunction);
} else {
- return _putIfAbsent(exports._jsProxies, o, dart.fn(o => new _DartObject(o), _DartObject, [dart.dynamic]));
+ return _putIfAbsent(_jsProxies, o, dart.fn(o => new _DartObject(o), _DartObject, [dart.dynamic]));
}
}
dart.fn(_convertToJS);
@@ -346,7 +346,7 @@ dart_library.library('dart/js', null, /* Imports */[
let args = Array.prototype.map.call(arguments, _convertToDart);
return _convertToJS(f(...args));
};
- dart.dsetindex(exports._dartProxies, wrapper, f);
+ dart.dsetindex(_dartProxies, wrapper, f);
return wrapper;
}
dart.fn(_wrapDartFunction);
@@ -359,7 +359,7 @@ dart_library.library('dart/js', null, /* Imports */[
} else if (dart.is(o, _DartObject) && dart.jsobject != dart.realRuntimeType(o)) {
return dart.dload(o, _dartObj);
} else {
- return _putIfAbsent(exports._dartProxies, o, _wrapToDart);
+ return _putIfAbsent(_dartProxies, o, _wrapToDart);
}
}
dart.fn(_convertToDart, core.Object, [dart.dynamic]);
@@ -373,14 +373,8 @@ dart_library.library('dart/js', null, /* Imports */[
return new JsObject._fromJs(o);
}
dart.fn(_wrapToDart, JsObject, [dart.dynamic]);
- dart.defineLazyProperties(exports, {
- get _dartProxies() {
- return new WeakMap();
- },
- get _jsProxies() {
- return new WeakMap();
- }
- });
+ const _dartProxies = new WeakMap();
+ const _jsProxies = new WeakMap();
function _putIfAbsent(weakMap, o, getValue) {
let value = weakMap.get(o);
if (value == null) {
« no previous file with comments | « lib/runtime/dart/_js_mirrors.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698