michael@0: /* michael@0: * Bug 800407 - Functions defined with Function construcor michael@0: * do have strict mode when JSOPTION_STRICT_MODE is on. michael@0: */ michael@0: michael@0: options("strict_mode"); michael@0: function testRunOptionStrictMode(str, arg, result) { michael@0: var strict_inner = new Function('return typeof this == "undefined";'); michael@0: return strict_inner; michael@0: } michael@0: assertEq(eval(uneval(testRunOptionStrictMode()))(), true); michael@0: michael@0: if (typeof decompileBody !== "undefined") { michael@0: assertEq(decompileBody(new Function('x', 'return x*2;')).contains('\n"use strict"'), true); michael@0: } michael@0: michael@0: reportCompare(true, true);