Commit b99f5852 authored by Phil Ringnalda's avatar Phil Ringnalda
Browse files

Back out 4ef39e03c9d9 (bug 736792) for jsreftest failures

parent adbf7a28
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
+0 −2
Original line number Diff line number Diff line
@@ -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;
}

+1 −5
Original line number Diff line number Diff line
@@ -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)
+0 −1
Original line number Diff line number Diff line
@@ -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
+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");