|
1 /* |
|
2 * Bug 800407 - Functions defined with Function construcor |
|
3 * do have strict mode when JSOPTION_STRICT_MODE is on. |
|
4 */ |
|
5 |
|
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); |
|
12 |
|
13 if (typeof decompileBody !== "undefined") { |
|
14 assertEq(decompileBody(new Function('x', 'return x*2;')).contains('\n"use strict"'), true); |
|
15 } |
|
16 |
|
17 reportCompare(true, true); |