Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /*
2 * Bug 800407 - Functions defined with Function construcor
3 * do have strict mode when JSOPTION_STRICT_MODE is on.
4 */
6 options("strict_mode");
7 function testRunOptionStrictMode(str, arg, result) {
8 var strict_inner = new Function('return typeof this == "undefined";');
9 return strict_inner;
10 }
11 assertEq(eval(uneval(testRunOptionStrictMode()))(), true);
13 if (typeof decompileBody !== "undefined") {
14 assertEq(decompileBody(new Function('x', 'return x*2;')).contains('\n"use strict"'), true);
15 }
17 reportCompare(true, true);