mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1260620 - Ensure that possibleErrors are not null before attempting to check them; r=jorendorff
This commit is contained in:
parent
c5fa3b7151
commit
da0f14f2ef
@ -7587,8 +7587,11 @@ Parser<ParseHandler>::expr(InHandling inHandling, YieldHandling yieldHandling,
|
||||
|
||||
// We begin by checking for an outer pending error since it would
|
||||
// have occurred first.
|
||||
if (possibleError->checkForExprErrors())
|
||||
possibleErrorInner.checkForExprErrors();
|
||||
if (possibleError && !possibleError->checkForExprErrors())
|
||||
return null();
|
||||
|
||||
// Go ahead and report the inner error.
|
||||
possibleErrorInner.checkForExprErrors();
|
||||
return null();
|
||||
}
|
||||
handler.addList(seq, pn);
|
||||
|
@ -38,6 +38,7 @@ const SYNTAX_ERROR_STMTS = [
|
||||
"delete ({x=1})",
|
||||
"delete {x=1} = {}",
|
||||
"({x=1}.abc)",
|
||||
"x > (0, {a = b} );",
|
||||
// declarations
|
||||
"var x = 0 + {a=1} = {}",
|
||||
"let o = {x=1};",
|
||||
|
Loading…
Reference in New Issue
Block a user