blob: 446ddbadc860fe827c4e7d0ac4c6ffdcc518a258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
load(libdir + "immutable-prototype.js");
if (globalPrototypeChainIsMutable())
this.__proto__ = [];
if (!this.hasOwnProperty("TypedObject") || typeof minorgc !== 'function')
quit();
var T = TypedObject;
var ObjectStruct = new T.StructType({f: T.Object});
var o = new ObjectStruct();
minorgc();
function writeObject(o, v) {
o.f = v;
assertEq(typeof o.f, "object");
}
for (var i = 0; i < 5; i++)
writeObject(o, { toString: function() { return "helo"; } });
|