From 2d430a86cc0cd056b2ef42db17d978a05593613b Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Sun, 1 Apr 2018 18:27:39 +0200 Subject: [PATCH] Bug 1083458 - Remove expression closure warning. r=jandem --HG-- extra : rebase_source : d9e55f67a575be0ff838d104d2f3e71e4eb1086d extra : histedit_source : 4fbd92fa72fd08a0ebc1aef7909258ec05dd44c0 --- js/src/frontend/Parser.cpp | 17 ----------------- js/src/frontend/Parser.h | 2 -- js/src/js.msg | 3 --- js/src/vm/JSCompartment.cpp | 1 - js/src/vm/JSCompartment.h | 1 - 5 files changed, 24 deletions(-) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 965d64c3b357..2f58af969b90 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -10055,23 +10055,6 @@ ParserBase::addTelemetry(DeprecatedLanguageExtension e) context->compartment()->addTelemetry(getFilename(), e); } -template -bool -GeneralParser::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; template class PerHandlerParser; template class GeneralParser; diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h index f5fe736be592..563c1b710cf5 100644 --- a/js/src/frontend/Parser.h +++ b/js/src/frontend/Parser.h @@ -913,8 +913,6 @@ class GeneralParser /* Report the given warning at the given offset. */ MOZ_MUST_USE bool warningAt(uint32_t offset, unsigned errorNumber, ...); - bool warnOnceAboutExprClosure(); - /* * If extra warnings are enabled, report the given warning at the current * offset. diff --git a/js/src/js.msg b/js/src/js.msg index 109ac1c73264..f57d28eae85a 100644 --- a/js/src/js.msg +++ b/js/src/js.msg @@ -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_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_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_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_FORMAL, 1, JSEXN_SYNTAXERR, "duplicate formal argument {0}") MSG_DEF(JSMSG_DUPLICATE_LABEL, 0, JSEXN_SYNTAXERR, "duplicate label") diff --git a/js/src/vm/JSCompartment.cpp b/js/src/vm/JSCompartment.cpp index f74ecd1c1eb8..3e40418ea83d 100644 --- a/js/src/vm/JSCompartment.cpp +++ b/js/src/vm/JSCompartment.cpp @@ -51,7 +51,6 @@ JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options = isAtomsCompartment_(false), isSelfHosting(false), marked(true), - warnedAboutExprClosure(false), warnedAboutStringGenericsMethods(0), #ifdef DEBUG firedOnNewGlobalObject(false), diff --git a/js/src/vm/JSCompartment.h b/js/src/vm/JSCompartment.h index aa16279ee9b6..6e229c00b9d9 100644 --- a/js/src/vm/JSCompartment.h +++ b/js/src/vm/JSCompartment.h @@ -619,7 +619,6 @@ struct JSCompartment public: bool isSelfHosting; bool marked; - bool warnedAboutExprClosure : 1; uint32_t warnedAboutStringGenericsMethods; #ifdef DEBUG