blob: 06174013e8e59b69c88dd1ab464eff3e327c51c0 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// |reftest| skip-if(!xulRuntime.shell)
assertThrowsInstanceOf(() => evaluate(`try { throw {} } catch ({e}) { var e; }`), SyntaxError);
assertThrowsInstanceOf(() => evaluate(`try { throw {} } catch ({e}) { eval('var e'); }`), SyntaxError);
assertThrowsInstanceOf(() => new Function(`try { throw {} } catch ({e}) { var e; }`), SyntaxError);
assertThrowsInstanceOf(new Function(`try { throw {} } catch ({e}) { eval('var e'); }`), SyntaxError);
if (typeof reportCompare === "function")
reportCompare(true, true);
|