From 3e80a2a52fe4716b57159e68cbcf3c4d397f77eb Mon Sep 17 00:00:00 2001 From: Sean Stangl Date: Tue, 1 May 2018 16:03:00 -0400 Subject: [PATCH] Bug 1458382 - Break up a one-liner to prevent an internal GCC 8.0.1 error. r=Waldo --- js/src/frontend/Parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index a8e0e1faca7a..a8f3805f654b 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -9162,7 +9162,11 @@ void GeneralParser::checkDestructuringAssignmentName(Node name, TokenPos namePos, PossibleError* possibleError) { - MOZ_ASSERT(handler.isName(name)); +#ifdef DEBUG + // GCC 8.0.1 crashes if this is a one-liner. + bool isName = handler.isName(name); + MOZ_ASSERT(isName); +#endif // Return early if a pending destructuring error is already present. if (possibleError->hasPendingDestructuringError())