Bug 823978 - Rename JSOPTION_STRICT to JSOPTION_EXTRA_WARNINGS. r=Waldo

--HG--
extra : rebase_source : f5c0e9c743dadb0431eacef6b46b6e274264d3aa
This commit is contained in:
Benjamin Peterson 2013-06-11 10:55:21 -07:00
Родитель 7996f69d48
Коммит 6a8ee25998
16 изменённых файлов: 56 добавлений и 54 удалений

Просмотреть файл

@ -988,9 +988,9 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
bool strict = Preferences::GetBool(js_strict_option_str); bool strict = Preferences::GetBool(js_strict_option_str);
if (strict) if (strict)
newDefaultJSOptions |= JSOPTION_STRICT; newDefaultJSOptions |= JSOPTION_EXTRA_WARNINGS;
else else
newDefaultJSOptions &= ~JSOPTION_STRICT; newDefaultJSOptions &= ~JSOPTION_EXTRA_WARNINGS;
// The vanilla GetGlobalObject returns null if a global isn't set up on // The vanilla GetGlobalObject returns null if a global isn't set up on
// the context yet. We can sometimes be call midway through context init, // the context yet. We can sometimes be call midway through context init,
@ -1056,9 +1056,9 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
// In debug builds, warnings are enabled in chrome context if // In debug builds, warnings are enabled in chrome context if
// javascript.options.strict.debug is true // javascript.options.strict.debug is true
bool strictDebug = Preferences::GetBool(js_strict_debug_option_str); bool strictDebug = Preferences::GetBool(js_strict_debug_option_str);
if (strictDebug && (newDefaultJSOptions & JSOPTION_STRICT) == 0) { if (strictDebug && (newDefaultJSOptions & JSOPTION_EXTRA_WARNINGS) == 0) {
if (chromeWindow || !contentWindow) if (chromeWindow || !contentWindow)
newDefaultJSOptions |= JSOPTION_STRICT; newDefaultJSOptions |= JSOPTION_WARNINGS;
} }
#endif #endif

Просмотреть файл

@ -285,7 +285,7 @@ LoadJSContextOptions(const char* aPrefName, void* /* aClosure */)
// Common options. // Common options.
uint32_t commonOptions = kRequiredJSContextOptions; uint32_t commonOptions = kRequiredJSContextOptions;
if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("strict"))) { if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("strict"))) {
commonOptions |= JSOPTION_STRICT; commonOptions |= JSOPTION_EXTRA_WARNINGS;
} }
if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("werror"))) { if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("werror"))) {
commonOptions |= JSOPTION_WERROR; commonOptions |= JSOPTION_WERROR;

Просмотреть файл

@ -1319,7 +1319,7 @@ class ObjectBox {
enum ParseReportKind { enum ParseReportKind {
ParseError, ParseError,
ParseWarning, ParseWarning,
ParseStrictWarning, ParseExtraWarning,
ParseStrictError ParseStrictError
}; };

Просмотреть файл

@ -350,7 +350,7 @@ Parser<ParseHandler>::reportHelper(ParseReportKind kind, bool strict, uint32_t o
result = result =
tokenStream.reportCompileErrorNumberVA(offset, JSREPORT_WARNING, errorNumber, args); tokenStream.reportCompileErrorNumberVA(offset, JSREPORT_WARNING, errorNumber, args);
break; break;
case ParseStrictWarning: case ParseExtraWarning:
result = tokenStream.reportStrictWarningErrorNumberVA(offset, errorNumber, args); result = tokenStream.reportStrictWarningErrorNumberVA(offset, errorNumber, args);
break; break;
case ParseStrictError: case ParseStrictError:
@ -424,10 +424,10 @@ Parser<ParseHandler>::Parser(JSContext *cx, const CompileOptions &options,
cx->runtime()->activeCompilations++; cx->runtime()->activeCompilations++;
// The Mozilla specific 'strict' option adds extra warnings which are not // The Mozilla specific JSOPTION_EXTRA_WARNINGS option adds extra warnings
// generated if functions are parsed lazily. Note that the standard // which are not generated if functions are parsed lazily. Note that the
// "use strict" does not inhibit lazy parsing. // standard "use strict" does not inhibit lazy parsing.
if (context->hasStrictOption()) if (context->hasExtraWarningsOption())
handler.disableSyntaxParser(); handler.disableSyntaxParser();
tempPoolMark = cx->tempLifoAlloc().mark(); tempPoolMark = cx->tempLifoAlloc().mark();
@ -792,7 +792,7 @@ Parser<ParseHandler>::checkFinalReturn(Node pn)
{ {
JS_ASSERT(pc->sc->isFunctionBox()); JS_ASSERT(pc->sc->isFunctionBox());
return HasFinalReturn(pn) == ENDS_IN_RETURN || return HasFinalReturn(pn) == ENDS_IN_RETURN ||
reportBadReturn(pn, ParseStrictWarning, reportBadReturn(pn, ParseExtraWarning,
JSMSG_NO_RETURN_VALUE, JSMSG_ANON_NO_RETURN_VALUE); JSMSG_NO_RETURN_VALUE, JSMSG_ANON_NO_RETURN_VALUE);
} }
@ -1060,7 +1060,7 @@ Parser<ParseHandler>::functionBody(FunctionSyntaxKind kind, FunctionBodyType typ
} }
/* Check for falling off the end of a function that returns a value. */ /* Check for falling off the end of a function that returns a value. */
if (context->hasStrictOption() && pc->funHasReturnExpr && !checkFinalReturn(pn)) if (context->hasExtraWarningsOption() && pc->funHasReturnExpr && !checkFinalReturn(pn))
return null(); return null();
if (kind != Arrow) { if (kind != Arrow) {
@ -1716,10 +1716,10 @@ Parser<FullParseHandler>::checkFunctionDefinition(HandlePropertyName funName,
JS_ASSERT(!dn->isUsed()); JS_ASSERT(!dn->isUsed());
JS_ASSERT(dn->isDefn()); JS_ASSERT(dn->isDefn());
if (context->hasStrictOption() || dn->kind() == Definition::CONST) { if (context->hasExtraWarningsOption() || dn->kind() == Definition::CONST) {
JSAutoByteString name; JSAutoByteString name;
ParseReportKind reporter = (dn->kind() != Definition::CONST) ParseReportKind reporter = (dn->kind() != Definition::CONST)
? ParseStrictWarning ? ParseExtraWarning
: ParseError; : ParseError;
if (!js_AtomToPrintableString(context, funName, &name) || if (!js_AtomToPrintableString(context, funName, &name) ||
!report(reporter, false, NULL, JSMSG_REDECLARED_VAR, !report(reporter, false, NULL, JSMSG_REDECLARED_VAR,
@ -2610,7 +2610,7 @@ Parser<ParseHandler>::condition()
/* Check for (a = b) and warn about possible (a == b) mistype. */ /* Check for (a = b) and warn about possible (a == b) mistype. */
if (handler.isOperationWithoutParens(pn, PNK_ASSIGN) && if (handler.isOperationWithoutParens(pn, PNK_ASSIGN) &&
!report(ParseStrictWarning, false, null(), JSMSG_EQUAL_AS_ASSIGN)) !report(ParseExtraWarning, false, null(), JSMSG_EQUAL_AS_ASSIGN))
{ {
return null(); return null();
} }
@ -2884,7 +2884,7 @@ Parser<ParseHandler>::bindVarOrConst(JSContext *cx, BindData<ParseHandler> *data
parser->report(ParseError, false, pn, JSMSG_REDECLARED_PARAM, bytes.ptr()); parser->report(ParseError, false, pn, JSMSG_REDECLARED_PARAM, bytes.ptr());
return false; return false;
} }
if (!parser->report(ParseStrictWarning, false, pn, JSMSG_VAR_HIDES_ARG, bytes.ptr())) if (!parser->report(ParseExtraWarning, false, pn, JSMSG_VAR_HIDES_ARG, bytes.ptr()))
return false; return false;
} else { } else {
bool error = (isConstDecl || bool error = (isConstDecl ||
@ -2892,12 +2892,12 @@ Parser<ParseHandler>::bindVarOrConst(JSContext *cx, BindData<ParseHandler> *data
(dn_kind == Definition::LET && (dn_kind == Definition::LET &&
(stmt->type != STMT_CATCH || OuterLet(pc, stmt, name)))); (stmt->type != STMT_CATCH || OuterLet(pc, stmt, name))));
if (cx->hasStrictOption() if (cx->hasExtraWarningsOption()
? data->op != JSOP_DEFVAR || dn_kind != Definition::VAR ? data->op != JSOP_DEFVAR || dn_kind != Definition::VAR
: error) : error)
{ {
JSAutoByteString bytes; JSAutoByteString bytes;
ParseReportKind reporter = error ? ParseError : ParseStrictWarning; ParseReportKind reporter = error ? ParseError : ParseExtraWarning;
if (!js_AtomToPrintableString(cx, name, &bytes) || if (!js_AtomToPrintableString(cx, name, &bytes) ||
!parser->report(reporter, false, pn, JSMSG_REDECLARED_VAR, !parser->report(reporter, false, pn, JSMSG_REDECLARED_VAR,
Definition::kindString(dn_kind), bytes.ptr())) Definition::kindString(dn_kind), bytes.ptr()))
@ -3288,8 +3288,8 @@ Parser<ParseHandler>::returnOrYield(bool useAssignExpr)
return null(); return null();
} }
if (context->hasStrictOption() && pc->funHasReturnExpr && pc->funHasReturnVoid && if (context->hasExtraWarningsOption() && pc->funHasReturnExpr && pc->funHasReturnVoid &&
!reportBadReturn(pn, ParseStrictWarning, !reportBadReturn(pn, ParseExtraWarning,
JSMSG_NO_RETURN_VALUE, JSMSG_ANON_NO_RETURN_VALUE)) JSMSG_NO_RETURN_VALUE, JSMSG_ANON_NO_RETURN_VALUE))
{ {
return null(); return null();
@ -4320,10 +4320,10 @@ Parser<ParseHandler>::withStatement()
uint32_t begin = tokenStream.currentToken().pos.begin; uint32_t begin = tokenStream.currentToken().pos.begin;
// In most cases, we want the constructs forbidden in strict mode code to be // In most cases, we want the constructs forbidden in strict mode code to be
// a subset of those that JSOPTION_STRICT warns about, and we should use // a subset of those that JSOPTION_EXTRA_WARNINGS warns about, and we should
// reportStrictModeError. However, 'with' is the sole instance of a // use reportStrictModeError. However, 'with' is the sole instance of a
// construct that is forbidden in strict mode code, but doesn't even merit a // construct that is forbidden in strict mode code, but doesn't even merit a
// warning under JSOPTION_STRICT. See // warning under JSOPTION_EXTRA_WARNINGS. See
// https://bugzilla.mozilla.org/show_bug.cgi?id=514576#c1. // https://bugzilla.mozilla.org/show_bug.cgi?id=514576#c1.
if (pc->sc->strict && !report(ParseStrictError, true, null(), JSMSG_STRICT_CODE_WITH)) if (pc->sc->strict && !report(ParseStrictError, true, null(), JSMSG_STRICT_CODE_WITH))
return null(); return null();
@ -4571,7 +4571,7 @@ Parser<ParseHandler>::statement()
return null(); return null();
if (handler.isEmptySemicolon(thenBranch) && if (handler.isEmptySemicolon(thenBranch) &&
!report(ParseStrictWarning, false, null(), JSMSG_EMPTY_CONSEQUENT)) !report(ParseExtraWarning, false, null(), JSMSG_EMPTY_CONSEQUENT))
{ {
return null(); return null();
} }

Просмотреть файл

@ -24,7 +24,7 @@ SharedContext::SharedContext(JSContext *cx, bool strict)
inline bool inline bool
SharedContext::needStrictChecks() SharedContext::needStrictChecks()
{ {
return context->hasStrictOption() || strict; return context->hasExtraWarningsOption() || strict;
} }
inline GlobalSharedContext * inline GlobalSharedContext *

Просмотреть файл

@ -168,7 +168,7 @@ class SharedContext
void setBindingsAccessedDynamically() { anyCxFlags.bindingsAccessedDynamically = true; } void setBindingsAccessedDynamically() { anyCxFlags.bindingsAccessedDynamically = true; }
void setHasDebuggerStatement() { anyCxFlags.hasDebuggerStatement = true; } void setHasDebuggerStatement() { anyCxFlags.hasDebuggerStatement = true; }
// JSOPTION_STRICT warnings or strict mode errors. // JSOPTION_EXTRA_WARNINGS warnings or strict mode errors.
inline bool needStrictChecks(); inline bool needStrictChecks();
}; };

Просмотреть файл

@ -605,7 +605,7 @@ TokenStream::reportStrictModeErrorNumberVA(uint32_t offset, bool strictMode, uns
unsigned flags = JSREPORT_STRICT; unsigned flags = JSREPORT_STRICT;
if (strictMode) if (strictMode)
flags |= JSREPORT_ERROR; flags |= JSREPORT_ERROR;
else if (cx->hasStrictOption()) else if (cx->hasExtraWarningsOption())
flags |= JSREPORT_WARNING; flags |= JSREPORT_WARNING;
else else
return true; return true;
@ -784,7 +784,7 @@ TokenStream::reportWarning(unsigned errorNumber, ...)
bool bool
TokenStream::reportStrictWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, va_list args) TokenStream::reportStrictWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, va_list args)
{ {
if (!cx->hasStrictOption()) if (!cx->hasExtraWarningsOption())
return true; return true;
return reportCompileErrorNumberVA(offset, JSREPORT_STRICT|JSREPORT_WARNING, errorNumber, args); return reportCompileErrorNumberVA(offset, JSREPORT_STRICT|JSREPORT_WARNING, errorNumber, args);

Просмотреть файл

@ -2,6 +2,6 @@
options("werror"); options("werror");
// This construct causes a strict warning, but we shouldn't get one since // This construct causes a strict warning, but we shouldn't get one since
// JSOPTION_STRICT isn't enabled. // JSOPTION_EXTRA_WARNINGS isn't enabled.
var x; var x;
eval("if (x = 3) {}"); eval("if (x = 3) {}");

Просмотреть файл

@ -1906,7 +1906,7 @@ JS_StringToVersion(const char *string);
* JSOPTION_VAROBJFIX is recommended -- see the comments associated with the * JSOPTION_VAROBJFIX is recommended -- see the comments associated with the
* prototypes for JS_ExecuteScript, JS_EvaluateScript, etc. * prototypes for JS_ExecuteScript, JS_EvaluateScript, etc.
*/ */
#define JSOPTION_STRICT JS_BIT(0) /* warn on dubious practice */ #define JSOPTION_EXTRA_WARNINGS JS_BIT(0) /* warn on dubious practices */
#define JSOPTION_WERROR JS_BIT(1) /* convert warning to error */ #define JSOPTION_WERROR JS_BIT(1) /* convert warning to error */
#define JSOPTION_VAROBJFIX JS_BIT(2) /* make JS_EvaluateScript use #define JSOPTION_VAROBJFIX JS_BIT(2) /* make JS_EvaluateScript use
the last object on its 'obj' the last object on its 'obj'

Просмотреть файл

@ -677,7 +677,7 @@ js::WouldDefinePastNonwritableLength(JSContext *cx, HandleObject obj, uint32_t i
} }
*definesPast = true; *definesPast = true;
if (!strict && !cx->hasStrictOption()) if (!strict && !cx->hasExtraWarningsOption())
return true; return true;
// Error in strict mode code or warn with strict option. // Error in strict mode code or warn with strict option.

Просмотреть файл

@ -540,20 +540,20 @@ checkReportFlags(JSContext *cx, unsigned *flags)
{ {
if (JSREPORT_IS_STRICT_MODE_ERROR(*flags)) { if (JSREPORT_IS_STRICT_MODE_ERROR(*flags)) {
/* /*
* Error in strict code; warning with strict option; okay otherwise. * Error in strict code; warning with extra warnings option; okay
* We assume that if the top frame is a native, then it is strict if * otherwise. We assume that if the top frame is a native, then it is
* the nearest scripted frame is strict, see bug 536306. * strict if the nearest scripted frame is strict, see bug 536306.
*/ */
JSScript *script = cx->stack.currentScript(); JSScript *script = cx->stack.currentScript();
if (script && script->strict) if (script && script->strict)
*flags &= ~JSREPORT_WARNING; *flags &= ~JSREPORT_WARNING;
else if (cx->hasStrictOption()) else if (cx->hasExtraWarningsOption())
*flags |= JSREPORT_WARNING; *flags |= JSREPORT_WARNING;
else else
return true; return true;
} else if (JSREPORT_IS_STRICT(*flags)) { } else if (JSREPORT_IS_STRICT(*flags)) {
/* Warning/error only when JSOPTION_STRICT is set. */ /* Warning/error only when JSOPTION_STRICT is set. */
if (!cx->hasStrictOption()) if (!cx->hasExtraWarningsOption())
return true; return true;
} }

Просмотреть файл

@ -1709,7 +1709,7 @@ struct JSContext : js::ContextFriendFields,
return !!(options_ & opt); return !!(options_ & opt);
} }
bool hasStrictOption() const { return hasOption(JSOPTION_STRICT); } bool hasExtraWarningsOption() const { return hasOption(JSOPTION_EXTRA_WARNINGS); }
bool hasWErrorOption() const { return hasOption(JSOPTION_WERROR); } bool hasWErrorOption() const { return hasOption(JSOPTION_WERROR); }
js::LifoAlloc &tempLifoAlloc() { return runtime()->tempLifoAlloc; } js::LifoAlloc &tempLifoAlloc() { return runtime()->tempLifoAlloc; }

Просмотреть файл

@ -3941,8 +3941,8 @@ GetPropertyHelperInline(JSContext *cx,
return false; return false;
} }
/* Don't warn if not strict or for random getprop operations. */ /* Don't warn if extra warnings not enabled or for random getprop operations. */
if (!cx->hasStrictOption() || (op != JSOP_GETPROP && op != JSOP_GETELEM)) if (!cx->hasExtraWarningsOption() || (op != JSOP_GETPROP && op != JSOP_GETELEM))
return true; return true;
/* Don't warn repeatedly for the same script. */ /* Don't warn repeatedly for the same script. */
@ -4162,8 +4162,9 @@ MaybeReportUndeclaredVarAssignment(JSContext *cx, JSString *propname)
if (!script) if (!script)
return true; return true;
/* If neither cx nor the code is strict, then no check is needed. */ // If the code is not strict and extra warnings aren't enabled, then no
if (!script->strict && !cx->hasStrictOption()) // check is needed.
if (!script->strict && !cx->hasExtraWarningsOption())
return true; return true;
} }
@ -4185,8 +4186,9 @@ js::ReportIfUndeclaredVarAssignment(JSContext *cx, HandleString propname)
if (!script) if (!script)
return true; return true;
/* If neither cx nor the code is strict, then no check is needed. */ // If the code is not strict and extra warnings aren't enabled, then no
if (!script->strict && !cx->hasStrictOption()) // check is needed.
if (!script->strict && !cx->hasExtraWarningsOption())
return true; return true;
/* /*
@ -4288,7 +4290,7 @@ baseops::SetPropertyHelper(JSContext *cx, HandleObject obj, HandleObject receive
if (pd.attrs & JSPROP_READONLY) { if (pd.attrs & JSPROP_READONLY) {
if (strict) if (strict)
return JSObject::reportReadOnly(cx, id, JSREPORT_ERROR); return JSObject::reportReadOnly(cx, id, JSREPORT_ERROR);
if (cx->hasStrictOption()) if (cx->hasExtraWarningsOption())
return JSObject::reportReadOnly(cx, id, JSREPORT_STRICT | JSREPORT_WARNING); return JSObject::reportReadOnly(cx, id, JSREPORT_STRICT | JSREPORT_WARNING);
return true; return true;
} }
@ -4332,10 +4334,10 @@ baseops::SetPropertyHelper(JSContext *cx, HandleObject obj, HandleObject receive
JS_ASSERT(shape->isDataDescriptor()); JS_ASSERT(shape->isDataDescriptor());
if (!shape->writable()) { if (!shape->writable()) {
/* Error in strict mode code, warn with strict option, otherwise do nothing. */ /* Error in strict mode code, warn with extra warnings options, otherwise do nothing. */
if (strict) if (strict)
return JSObject::reportReadOnly(cx, id, JSREPORT_ERROR); return JSObject::reportReadOnly(cx, id, JSREPORT_ERROR);
if (cx->hasStrictOption()) if (cx->hasExtraWarningsOption())
return JSObject::reportReadOnly(cx, id, JSREPORT_STRICT | JSREPORT_WARNING); return JSObject::reportReadOnly(cx, id, JSREPORT_STRICT | JSREPORT_WARNING);
return JS_TRUE; return JS_TRUE;
} }
@ -4409,10 +4411,10 @@ baseops::SetPropertyHelper(JSContext *cx, HandleObject obj, HandleObject receive
if (!shape) { if (!shape) {
if (!obj->isExtensible()) { if (!obj->isExtensible()) {
/* Error in strict mode code, warn with strict option, otherwise do nothing. */ /* Error in strict mode code, warn with extra warnings option, otherwise do nothing. */
if (strict) if (strict)
return obj->reportNotExtensible(cx); return obj->reportNotExtensible(cx);
if (cx->hasStrictOption()) if (cx->hasExtraWarningsOption())
return obj->reportNotExtensible(cx, JSREPORT_STRICT | JSREPORT_WARNING); return obj->reportNotExtensible(cx, JSREPORT_STRICT | JSREPORT_WARNING);
return true; return true;
} }

Просмотреть файл

@ -583,7 +583,7 @@ static const struct JSOption {
const char *name; const char *name;
uint32_t flag; uint32_t flag;
} js_options[] = { } js_options[] = {
{"strict", JSOPTION_STRICT}, {"strict", JSOPTION_EXTRA_WARNINGS},
{"typeinfer", JSOPTION_TYPE_INFERENCE}, {"typeinfer", JSOPTION_TYPE_INFERENCE},
{"werror", JSOPTION_WERROR}, {"werror", JSOPTION_WERROR},
{"strict_mode", JSOPTION_STRICT_MODE}, {"strict_mode", JSOPTION_STRICT_MODE},
@ -4934,7 +4934,7 @@ ProcessArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
reportWarnings = JS_FALSE; reportWarnings = JS_FALSE;
if (op->getBoolOption('s')) if (op->getBoolOption('s'))
JS_ToggleOptions(cx, JSOPTION_STRICT); JS_ToggleOptions(cx, JSOPTION_EXTRA_WARNINGS);
if (op->getBoolOption('d')) { if (op->getBoolOption('d')) {
JS_SetRuntimeDebugMode(JS_GetRuntime(cx), true); JS_SetRuntimeDebugMode(JS_GetRuntime(cx), true);

Просмотреть файл

@ -698,7 +698,7 @@ static const struct JSOption {
const char *name; const char *name;
uint32_t flag; uint32_t flag;
} js_options[] = { } js_options[] = {
{"strict", JSOPTION_STRICT}, {"strict", JSOPTION_EXTRA_WARNINGS},
{"werror", JSOPTION_WERROR}, {"werror", JSOPTION_WERROR},
{"strict_mode", JSOPTION_STRICT_MODE}, {"strict_mode", JSOPTION_STRICT_MODE},
}; };
@ -1150,7 +1150,7 @@ ProcessArgsForCompartment(JSContext *cx, char **argv, int argc)
case 'S': case 'S':
JS_ToggleOptions(cx, JSOPTION_WERROR); JS_ToggleOptions(cx, JSOPTION_WERROR);
case 's': case 's':
JS_ToggleOptions(cx, JSOPTION_STRICT); JS_ToggleOptions(cx, JSOPTION_EXTRA_WARNINGS);
break; break;
case 'I': case 'I':
JS_ToggleOptions(cx, JSOPTION_COMPILE_N_GO); JS_ToggleOptions(cx, JSOPTION_COMPILE_N_GO);

Просмотреть файл

@ -4453,7 +4453,7 @@ SetBoolOption(JSContext* cx, uint32_t aOption, bool aValue)
return SetBoolOption(cx, _flag, aValue); \ return SetBoolOption(cx, _flag, aValue); \
} }
GENERATE_JSOPTION_GETTER_SETTER(Strict, JSOPTION_STRICT) GENERATE_JSOPTION_GETTER_SETTER(Strict, JSOPTION_EXTRA_WARNINGS)
GENERATE_JSOPTION_GETTER_SETTER(Werror, JSOPTION_WERROR) GENERATE_JSOPTION_GETTER_SETTER(Werror, JSOPTION_WERROR)
GENERATE_JSOPTION_GETTER_SETTER(Strict_mode, JSOPTION_STRICT_MODE) GENERATE_JSOPTION_GETTER_SETTER(Strict_mode, JSOPTION_STRICT_MODE)
GENERATE_JSOPTION_GETTER_SETTER(Ion, JSOPTION_ION) GENERATE_JSOPTION_GETTER_SETTER(Ion, JSOPTION_ION)