Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // |reftest| skip
2 // Any copyright is dedicated to the Public Domain.
3 // http://creativecommons.org/licenses/publicdomain/
5 //-----------------------------------------------------------------------------
6 var BUGNUMBER = 621432;
7 var summary =
8 "If a var statement can't create a global property because the global " +
9 "object isn't extensible, and an error is thrown while decompiling the " +
10 "global, don't assert";
12 print(BUGNUMBER + ": " + summary);
14 /**************
15 * BEGIN TEST *
16 **************/
18 var toSource = [];
19 Object.preventExtensions(this);
21 try
22 {
23 eval("var x;");
24 throw new Error("no error thrown");
25 }
26 catch (e)
27 {
28 reportCompare(e instanceof TypeError, true, "expected TypeError, got: " + e);
29 }
31 /******************************************************************************/
33 if (typeof reportCompare === "function")
34 reportCompare(true, true);
36 print("All tests passed!");