summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/FullParseHandler.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-07-14 16:18:57 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:46 -0400
commit6444d5d0ef586bda0a6e2745847fc1228ad7e5a2 (patch)
tree4d697c34a1d522b201dfc244beca666ed43758c5 /js/src/frontend/FullParseHandler.h
parent85aeff765ea921ea2c947fa9d68756eb989b6287 (diff)
downloadUXP-6444d5d0ef586bda0a6e2745847fc1228ad7e5a2.tar
UXP-6444d5d0ef586bda0a6e2745847fc1228ad7e5a2.tar.gz
UXP-6444d5d0ef586bda0a6e2745847fc1228ad7e5a2.tar.lz
UXP-6444d5d0ef586bda0a6e2745847fc1228ad7e5a2.tar.xz
UXP-6444d5d0ef586bda0a6e2745847fc1228ad7e5a2.zip
1339395 - Part 1: Align parse method for object literals to match array literals.
Diffstat (limited to 'js/src/frontend/FullParseHandler.h')
-rw-r--r--js/src/frontend/FullParseHandler.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/js/src/frontend/FullParseHandler.h b/js/src/frontend/FullParseHandler.h
index c7a7e0843..d34cdf43d 100644
--- a/js/src/frontend/FullParseHandler.h
+++ b/js/src/frontend/FullParseHandler.h
@@ -302,10 +302,9 @@ class FullParseHandler
}
MOZ_MUST_USE bool addSpreadElement(ParseNode* literal, uint32_t begin, ParseNode* inner) {
- TokenPos pos(begin, inner->pn_pos.end);
- ParseNode* spread = new_<UnaryNode>(PNK_SPREAD, JSOP_NOP, pos, inner);
+ ParseNode* spread = newSpread(begin, inner);
if (!spread)
- return null();
+ return false;
literal->append(spread);
literal->pn_xflags |= PNX_ARRAYHOLESPREAD | PNX_NONCONST;
return true;