michael@0: // |reftest| skip michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 621432; michael@0: var summary = michael@0: "If a var statement can't create a global property because the global " + michael@0: "object isn't extensible, and an error is thrown while decompiling the " + michael@0: "global, don't assert"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: var toSource = []; michael@0: Object.preventExtensions(this); michael@0: michael@0: try michael@0: { michael@0: eval("var x;"); michael@0: throw new Error("no error thrown"); michael@0: } michael@0: catch (e) michael@0: { michael@0: reportCompare(e instanceof TypeError, true, "expected TypeError, got: " + e); michael@0: } michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");