Bug 1083458 - Remove expression closure warning. r=jandem

--HG--
extra : rebase_source : d9e55f67a575be0ff838d104d2f3e71e4eb1086d
extra : histedit_source : 4fbd92fa72fd08a0ebc1aef7909258ec05dd44c0
This commit is contained in:
Tom Schuster 2018-04-01 18:27:39 +02:00
Родитель 91092f7582
Коммит 2d430a86cc
5 изменённых файлов: 0 добавлений и 24 удалений

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

@ -10055,23 +10055,6 @@ ParserBase::addTelemetry(DeprecatedLanguageExtension e)
context->compartment()->addTelemetry(getFilename(), e); context->compartment()->addTelemetry(getFilename(), e);
} }
template <class ParseHandler, typename CharT>
bool
GeneralParser<ParseHandler, CharT>::warnOnceAboutExprClosure()
{
#ifndef RELEASE_OR_BETA
if (context->helperThread())
return true;
if (!context->compartment()->warnedAboutExprClosure) {
if (!warning(JSMSG_DEPRECATED_EXPR_CLOSURE))
return false;
context->compartment()->warnedAboutExprClosure = true;
}
#endif
return true;
}
template class PerHandlerParser<FullParseHandler>; template class PerHandlerParser<FullParseHandler>;
template class PerHandlerParser<SyntaxParseHandler>; template class PerHandlerParser<SyntaxParseHandler>;
template class GeneralParser<FullParseHandler, char16_t>; template class GeneralParser<FullParseHandler, char16_t>;

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

@ -913,8 +913,6 @@ class GeneralParser
/* Report the given warning at the given offset. */ /* Report the given warning at the given offset. */
MOZ_MUST_USE bool warningAt(uint32_t offset, unsigned errorNumber, ...); MOZ_MUST_USE bool warningAt(uint32_t offset, unsigned errorNumber, ...);
bool warnOnceAboutExprClosure();
/* /*
* If extra warnings are enabled, report the given warning at the current * If extra warnings are enabled, report the given warning at the current
* offset. * offset.

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

@ -242,11 +242,8 @@ MSG_DEF(JSMSG_CURLY_IN_COMPOUND, 0, JSEXN_SYNTAXERR, "missing } in compoun
MSG_DEF(JSMSG_DECLARATION_AFTER_EXPORT,0, JSEXN_SYNTAXERR, "missing declaration after 'export' keyword") MSG_DEF(JSMSG_DECLARATION_AFTER_EXPORT,0, JSEXN_SYNTAXERR, "missing declaration after 'export' keyword")
MSG_DEF(JSMSG_DECLARATION_AFTER_IMPORT,0, JSEXN_SYNTAXERR, "missing declaration after 'import' keyword") MSG_DEF(JSMSG_DECLARATION_AFTER_IMPORT,0, JSEXN_SYNTAXERR, "missing declaration after 'import' keyword")
MSG_DEF(JSMSG_DEPRECATED_DELETE_OPERAND, 0, JSEXN_SYNTAXERR, "applying the 'delete' operator to an unqualified name is deprecated") MSG_DEF(JSMSG_DEPRECATED_DELETE_OPERAND, 0, JSEXN_SYNTAXERR, "applying the 'delete' operator to an unqualified name is deprecated")
MSG_DEF(JSMSG_DEPRECATED_EXPR_CLOSURE, 0, JSEXN_WARN, "expression closures are deprecated")
MSG_DEF(JSMSG_DEPRECATED_FOR_EACH, 0, JSEXN_WARN, "JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead")
MSG_DEF(JSMSG_DEPRECATED_OCTAL, 0, JSEXN_SYNTAXERR, "\"0\"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the \"0o\" prefix instead") MSG_DEF(JSMSG_DEPRECATED_OCTAL, 0, JSEXN_SYNTAXERR, "\"0\"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the \"0o\" prefix instead")
MSG_DEF(JSMSG_DEPRECATED_PRAGMA, 1, JSEXN_WARN, "Using //@ to indicate {0} pragmas is deprecated. Use //# instead") MSG_DEF(JSMSG_DEPRECATED_PRAGMA, 1, JSEXN_WARN, "Using //@ to indicate {0} pragmas is deprecated. Use //# instead")
MSG_DEF(JSMSG_DEPRECATED_BLOCK_SCOPE_FUN_REDECL, 1, JSEXN_WARN, "redeclaration of block-scoped function `{0}' is deprecated")
MSG_DEF(JSMSG_DUPLICATE_EXPORT_NAME, 1, JSEXN_SYNTAXERR, "duplicate export name '{0}'") MSG_DEF(JSMSG_DUPLICATE_EXPORT_NAME, 1, JSEXN_SYNTAXERR, "duplicate export name '{0}'")
MSG_DEF(JSMSG_DUPLICATE_FORMAL, 1, JSEXN_SYNTAXERR, "duplicate formal argument {0}") MSG_DEF(JSMSG_DUPLICATE_FORMAL, 1, JSEXN_SYNTAXERR, "duplicate formal argument {0}")
MSG_DEF(JSMSG_DUPLICATE_LABEL, 0, JSEXN_SYNTAXERR, "duplicate label") MSG_DEF(JSMSG_DUPLICATE_LABEL, 0, JSEXN_SYNTAXERR, "duplicate label")

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

@ -51,7 +51,6 @@ JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options =
isAtomsCompartment_(false), isAtomsCompartment_(false),
isSelfHosting(false), isSelfHosting(false),
marked(true), marked(true),
warnedAboutExprClosure(false),
warnedAboutStringGenericsMethods(0), warnedAboutStringGenericsMethods(0),
#ifdef DEBUG #ifdef DEBUG
firedOnNewGlobalObject(false), firedOnNewGlobalObject(false),

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

@ -619,7 +619,6 @@ struct JSCompartment
public: public:
bool isSelfHosting; bool isSelfHosting;
bool marked; bool marked;
bool warnedAboutExprClosure : 1;
uint32_t warnedAboutStringGenericsMethods; uint32_t warnedAboutStringGenericsMethods;
#ifdef DEBUG #ifdef DEBUG