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; |