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