Bug 922432 - OdinMonkey: improve error reporting (r=sstangl)
authorLuke Wagner <luke@mozilla.com>
Mon, 21 Oct 2013 17:07:06 -0500
changeset 166384 b299be671230fba31eda317ff2c5e7c6c8d712c1
parent 166383 ad6254a681f1a662a709ac377246db96a5e9de87
child 166385 9349b9b4b22c98825c6f13732e3c9c717e3cee43
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs922432
milestone27.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 922432 - OdinMonkey: improve error reporting (r=sstangl)
js/src/jit/AsmJS.cpp
--- a/js/src/jit/AsmJS.cpp
+++ b/js/src/jit/AsmJS.cpp
@@ -1319,17 +1319,17 @@ class MOZ_STACK_CLASS ModuleCompiler
         JS_ASSERT(errorOffset_ == UINT32_MAX);
         JS_ASSERT(str);
         errorOffset_ = offset;
         errorString_ = strdup(str);
         return false;
     }
 
     bool fail(ParseNode *pn, const char *str) {
-        return failOffset(pn ? pn->pn_pos.begin : parser_.tokenStream.currentToken().pos.end, str);
+        return failOffset(pn ? pn->pn_pos.begin : parser_.tokenStream.peekTokenPos().begin, str);
     }
 
     bool failfVA(ParseNode *pn, const char *fmt, va_list ap) {
         JS_ASSERT(!errorString_);
         JS_ASSERT(errorOffset_ == UINT32_MAX);
         JS_ASSERT(fmt);
         errorOffset_ = pn ? pn->pn_pos.begin : parser_.tokenStream.currentToken().pos.end;
         errorString_ = JS_vsmprintf(fmt, ap);