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

Unified Diff: tool/input_sdk/private/ddc_runtime/classes.dart

Issue 1969093002: Miscellaneous runtime fixes. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: address comments Created 4 years, 7 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 | « lib/runtime/dart_sdk.js ('k') | tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/ddc_runtime/classes.dart
diff --git a/tool/input_sdk/private/ddc_runtime/classes.dart b/tool/input_sdk/private/ddc_runtime/classes.dart
index 570fff1a0e2cadd38aff39d0ef5d6393198ac953..2c70a96e573db6c9787bb8d5aa7b2c238dd3cfe1 100644
--- a/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -284,9 +284,11 @@ defineExtensionNames(names) =>
_installProperties(jsProto, extProto) {
var coreObjProto = JS('', '#.prototype', Object);
if (JS('bool', '# === #', extProto, coreObjProto)) {
- // core.Object members need to be copied from the non-symbol name to the
- // symbol name.
- for (var name in getOwnPropertyNames(coreObjProto)) {
+ // core.Object members need to be copied from the non-symbol name to the
+ // symbol name.
+ var names = getOwnPropertyNames(coreObjProto);
+ for (int i = 0; i < JS('int', '#.length', names); ++i) {
+ var name = JS('', '#[#]', names, i);
var desc = getOwnPropertyDescriptor(coreObjProto, name);
defineProperty(jsProto, getExtensionSymbol(name), desc);
}
@@ -294,10 +296,10 @@ _installProperties(jsProto, extProto) {
}
if (JS('bool', '# !== #', jsProto, extProto)) {
_installProperties(jsProto, JS('', '#.__proto__', extProto));
- }
+ }
copyTheseProperties(jsProto, extProto, getOwnPropertySymbols(extProto));
}
-
+
///
/// Copy symbols from the prototype of the source to destination.
/// These are the only properties safe to copy onto an existing public
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698