Bug 1524965 - Part 0: Fix error message formatting in BinAST. r=Yoric
authorTooru Fujisawa <arai_a@mac.com>
Tue, 05 Feb 2019 00:34:07 +0900
changeset 516092 9849e6b02bc2
parent 516091 5732522a3540
child 516093 7fce2598a3de
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersYoric
bugs1524965
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1524965 - Part 0: Fix error message formatting in BinAST. r=Yoric Differential Revision: https://phabricator.services.mozilla.com/D18558
js/src/frontend/BinASTParserPerTokenizer.cpp
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -767,17 +767,17 @@ BinASTParserPerTokenizer<Tok>::raiseOOM(
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseError(BinKind kind,
                                           const char* description) {
   Sprinter out(cx_);
   BINJS_TRY(out.init());
-  BINJS_TRY(out.printf("In %s, ", description));
+  BINJS_TRY(out.printf("In %s, %s", describeBinKind(kind), description));
   return tokenizer_->raiseError(out.string());
 }
 
 template <typename Tok>
 mozilla::GenericErrorResult<JS::Error&>
 BinASTParserPerTokenizer<Tok>::raiseError(const char* description) {
   return tokenizer_->raiseError(description);
 }