| Index: test/mjsunit/proto-accessor.js
|
| diff --git a/test/mjsunit/proto-accessor.js b/test/mjsunit/proto-accessor.js
|
| index 513a044023e9db5d74449f5f4d46fb02a74ff571..935ea8dbeb3a4ef48be46c3961ea4c69e5e6cf8a 100644
|
| --- a/test/mjsunit/proto-accessor.js
|
| +++ b/test/mjsunit/proto-accessor.js
|
| @@ -29,6 +29,24 @@
|
| this.Symbol = typeof Symbol != 'undefined' ? Symbol : String;
|
|
|
|
|
| +function TestSetProtoValueCyclic() {
|
| + var objects = [
|
| + Object.prototype, {},
|
| + Array.prototype, [],
|
| + Error.prototype, new TypeError,
|
| + // etc ...
|
| + ];
|
| + for (var i = 0; i < objects.length; i += 2) {
|
| + var object = objects[i];
|
| + var value = objects[i+1];
|
| + assertThrows(function() {
|
| + object.__proto__ = value;
|
| + }, TypeError);
|
| + }
|
| +};
|
| +TestSetProtoValueCyclic();
|
| +
|
| +
|
| var desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
|
| var getProto = desc.get;
|
| var setProto = desc.set;
|
|
|