Bug 1283064 - restore correct value to |c.currentPrecedence| if PrintExpr fails. r?jorendorff
MozReview-Commit-ID: DGGyHIkXdt7
--- a/js/src/asmjs/WasmBinaryToExperimentalText.cpp
+++ b/js/src/asmjs/WasmBinaryToExperimentalText.cpp
@@ -366,18 +366,20 @@ PrintCallIndirect(WasmPrintContext& c, A
return false;
if (!c.buffer.append(" ["))
return false;
PrintOperatorPrecedence lastPrecedence = c.currentPrecedence;
c.currentPrecedence = ExpressionPrecedence;
- if (!PrintExpr(c, *call.index()))
+ if (!PrintExpr(c, *call.index())) {
+ c.currentPrecedence = lastPrecedence;
return false;
+ }
c.currentPrecedence = lastPrecedence;
if (!c.buffer.append("] "))
return false;
if (!PrintCallArgs(c, call.args()))
return false;
return true;