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

Unified Diff: lib/runtime/dart_runtime.js

Issue 1173903003: fixes #216, JSNumber members (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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: lib/runtime/dart_runtime.js
diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js
index 3cb2c617ca74a889de05701803c4b73659ee0b13..1b6125ee36822a219a4bb7c4581b004dfb6289c2 100644
--- a/lib/runtime/dart_runtime.js
+++ b/lib/runtime/dart_runtime.js
@@ -799,7 +799,12 @@ var dart, dartx;
// Mark the JS type's instances so we can easily check for extensions.
assert(jsProto[_extensionType] === void 0);
jsProto[_extensionType] = extProto;
- copyPropertiesHelper(jsProto, extProto, getOwnPropertySymbols(extProto));
+
+ let dartObjProto = core.Object.prototype;
+ while (extProto !== dartObjProto && extProto !== jsProto) {
+ copyPropertiesHelper(jsProto, extProto, getOwnPropertySymbols(extProto));
+ extProto = extProto.__proto__;
+ }
}
dart.registerExtension = registerExtension;

Powered by Google App Engine
This is Rietveld 408576698