blob: 6834a66de5a7f03877517a3d4b90127ae080cda8 [file] [log] [blame]
const realmA = $vm.createGlobalObject();
const realmB = $vm.createGlobalObject();
const realmC = $vm.createGlobalObject();
realmB.WeakSet.prototype.add =
realmC.WeakSet.prototype.add;
try {
Reflect.construct(realmA.WeakSet, [[0]], realmB.WeakSet);
throw "Didn't throw!";
} catch (err) {
if (!(err instanceof realmC.TypeError))
throw "Bad realm of an error!";
}