Loading js/src/frontend/BytecodeEmitter.h +0 −2 Original line number Diff line number Diff line Loading @@ -426,8 +426,6 @@ struct TreeContext { /* tree context for semantic checks */ }; bool init(JSContext *cx, InitBehavior ib = USED_AS_TREE_CONTEXT) { if (cx->hasRunOption(JSOPTION_STRICT_MODE)) flags |= TCF_STRICT_MODE_CODE; if (ib == USED_AS_CODE_GENERATOR) return true; return decls.init() && lexdeps.ensureMap(cx); Loading js/src/frontend/Parser.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -144,8 +144,6 @@ Parser::init(const jschar *base, size_t length, const char *filename, unsigned l cx->tempLifoAlloc().release(tempPoolMark); return false; } if (context->hasRunOption(JSOPTION_STRICT_MODE)) tokenStream.setStrictMode(); return true; } Loading js/src/jsapi.h +1 −5 Original line number Diff line number Diff line Loading @@ -2768,15 +2768,11 @@ JS_StringToVersion(const char *string); #define JSOPTION_PCCOUNT JS_BIT(17) /* Collect per-op execution counts */ #define JSOPTION_TYPE_INFERENCE JS_BIT(18) /* Perform type inference. */ #define JSOPTION_STRICT_MODE JS_BIT(19) /* Provides a way to force strict mode for all code without requiring "use strict" annotations. */ /* Options which reflect compile-time properties of scripts. */ #define JSCOMPILEOPTION_MASK (JSOPTION_XML) #define JSRUNOPTION_MASK (JS_BITMASK(20) & ~JSCOMPILEOPTION_MASK) #define JSRUNOPTION_MASK (JS_BITMASK(19) & ~JSCOMPILEOPTION_MASK) #define JSALLOPTION_MASK (JSCOMPILEOPTION_MASK | JSRUNOPTION_MASK) extern JS_PUBLIC_API(uint32_t) Loading js/src/shell/js.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -618,7 +618,6 @@ static const struct JSOption { {"typeinfer", JSOPTION_TYPE_INFERENCE}, {"werror", JSOPTION_WERROR}, {"xml", JSOPTION_XML}, {"strict_mode", JSOPTION_STRICT_MODE}, }; static uint32_t Loading js/src/tests/js1_8_5/regress/regress-736792.jsdeleted 100644 → 0 +0 −23 Original line number Diff line number Diff line /* * Any copyright is dedicated to the Public Domain. * http://creativecommons.org/licenses/publicdomain/ */ if (typeof options == "function") { var opts = options(); if (!/\bstrict_mode\b/.test(opts)) options("strict_mode"); } var ok = false; try { eval('foo = true;'); } catch (e) { if (/^ReferenceError:/.test(e.toString())) ok = true; } if (ok) reportCompare(0, 0, "ok"); else reportCompare(true, false, "this should have thrown a ReferenceError"); Loading
js/src/frontend/BytecodeEmitter.h +0 −2 Original line number Diff line number Diff line Loading @@ -426,8 +426,6 @@ struct TreeContext { /* tree context for semantic checks */ }; bool init(JSContext *cx, InitBehavior ib = USED_AS_TREE_CONTEXT) { if (cx->hasRunOption(JSOPTION_STRICT_MODE)) flags |= TCF_STRICT_MODE_CODE; if (ib == USED_AS_CODE_GENERATOR) return true; return decls.init() && lexdeps.ensureMap(cx); Loading
js/src/frontend/Parser.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -144,8 +144,6 @@ Parser::init(const jschar *base, size_t length, const char *filename, unsigned l cx->tempLifoAlloc().release(tempPoolMark); return false; } if (context->hasRunOption(JSOPTION_STRICT_MODE)) tokenStream.setStrictMode(); return true; } Loading
js/src/jsapi.h +1 −5 Original line number Diff line number Diff line Loading @@ -2768,15 +2768,11 @@ JS_StringToVersion(const char *string); #define JSOPTION_PCCOUNT JS_BIT(17) /* Collect per-op execution counts */ #define JSOPTION_TYPE_INFERENCE JS_BIT(18) /* Perform type inference. */ #define JSOPTION_STRICT_MODE JS_BIT(19) /* Provides a way to force strict mode for all code without requiring "use strict" annotations. */ /* Options which reflect compile-time properties of scripts. */ #define JSCOMPILEOPTION_MASK (JSOPTION_XML) #define JSRUNOPTION_MASK (JS_BITMASK(20) & ~JSCOMPILEOPTION_MASK) #define JSRUNOPTION_MASK (JS_BITMASK(19) & ~JSCOMPILEOPTION_MASK) #define JSALLOPTION_MASK (JSCOMPILEOPTION_MASK | JSRUNOPTION_MASK) extern JS_PUBLIC_API(uint32_t) Loading
js/src/shell/js.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -618,7 +618,6 @@ static const struct JSOption { {"typeinfer", JSOPTION_TYPE_INFERENCE}, {"werror", JSOPTION_WERROR}, {"xml", JSOPTION_XML}, {"strict_mode", JSOPTION_STRICT_MODE}, }; static uint32_t Loading
js/src/tests/js1_8_5/regress/regress-736792.jsdeleted 100644 → 0 +0 −23 Original line number Diff line number Diff line /* * Any copyright is dedicated to the Public Domain. * http://creativecommons.org/licenses/publicdomain/ */ if (typeof options == "function") { var opts = options(); if (!/\bstrict_mode\b/.test(opts)) options("strict_mode"); } var ok = false; try { eval('foo = true;'); } catch (e) { if (/^ReferenceError:/.test(e.toString())) ok = true; } if (ok) reportCompare(0, 0, "ok"); else reportCompare(true, false, "this should have thrown a ReferenceError");