mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 10:40:12 +00:00
Avoid strict warning set-up costs if strict option is off (335700, r=mrbkap).
This commit is contained in:
parent
6c60e2ac1c
commit
07e73ba791
@ -350,15 +350,17 @@ CheckGetterOrSetter(JSContext *cx, JSTokenStream *ts, JSTokenType tt)
|
||||
return TOK_ERROR;
|
||||
}
|
||||
CURRENT_TOKEN(ts).t_op = op;
|
||||
name = js_AtomToPrintableString(cx, atom);
|
||||
if (!name ||
|
||||
!js_ReportCompileErrorNumber(cx, ts,
|
||||
JSREPORT_TS |
|
||||
JSREPORT_WARNING |
|
||||
JSREPORT_STRICT,
|
||||
JSMSG_DEPRECATED_USAGE,
|
||||
name)) {
|
||||
return TOK_ERROR;
|
||||
if (JS_HAS_STRICT_OPTION(cx)) {
|
||||
name = js_AtomToPrintableString(cx, atom);
|
||||
if (!name ||
|
||||
!js_ReportCompileErrorNumber(cx, ts,
|
||||
JSREPORT_TS |
|
||||
JSREPORT_WARNING |
|
||||
JSREPORT_STRICT,
|
||||
JSMSG_DEPRECATED_USAGE,
|
||||
name)) {
|
||||
return TOK_ERROR;
|
||||
}
|
||||
}
|
||||
return tt;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user