1 // -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // Any copyright is dedicated to the Public Domain.
3 // http://creativecommons.org/licenses/publicdomain/
11 throw new Error("serializing " + uneval(v) + " should have failed with an exception");
14 // Unsupported object types.
15 check(new Error("oops"));
18 check(function () {});
19 check(Proxy.create({enumerate: function () { return []; }}));
21 check(new Namespace("x"));
22 check(new QName("x", "y"));
25 check({get x() { throw new Error("fail"); }});
27 // Various recursive objects, i.e. those which the structured cloning
28 // algorithm wants us to reject due to "memory".
40 // Mutually recursive objects.
46 // A recursive object that doesn't fail until 'memory' contains lots of objects.
49 for (var i = 0; i < 10000; i++) {
58 reportCompare(0, 0, "ok");