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 458210 9849e6b02bc2d32da3403130f1235b7c8296c651
parent 458209 5732522a3540af8ad2dbfcb156346b6e44ef2233
child 458211 7fce2598a3de8f3372ae4d7baba5f05b3ed36e5a
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [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);
 }