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 = 604504; michael@0: var summary = "eval called from a native function is indirect"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: var originalEval = eval; michael@0: michael@0: var global = this; michael@0: var directCheckCode = "this === global"; michael@0: michael@0: function testBound() michael@0: { michael@0: var global = "psych!"; michael@0: var eval = originalEval.bind(undefined, directCheckCode); michael@0: assertEq(eval(), true); michael@0: } michael@0: testBound(); 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!");