|
1 // |reftest| skip |
|
2 // Any copyright is dedicated to the Public Domain. |
|
3 // http://creativecommons.org/licenses/publicdomain/ |
|
4 |
|
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"; |
|
11 |
|
12 print(BUGNUMBER + ": " + summary); |
|
13 |
|
14 /************** |
|
15 * BEGIN TEST * |
|
16 **************/ |
|
17 |
|
18 var toSource = []; |
|
19 Object.preventExtensions(this); |
|
20 |
|
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 } |
|
30 |
|
31 /******************************************************************************/ |
|
32 |
|
33 if (typeof reportCompare === "function") |
|
34 reportCompare(true, true); |
|
35 |
|
36 print("All tests passed!"); |