Subramanya Sastry has submitted this change and it was merged. Change subject: Make sure the serializer initialState remains unchanged ......................................................................
Make sure the serializer initialState remains unchanged extendProps is just a shallow assignment of passed-in values, so for anything that is not assigned by value (objects for example) it would just assign a reference. These objects are later modified and will thus modify the initial serializer state for later serializer runs. This patch clones both options and initialState to avoid this issue. It also freezes the initialState to make sure any modification is detected early. My hope is that this will fix the random list issue we see in production. There are no changes in parserTests. Change-Id: Ic71e384b89241cf96bbff2186d2ea19945ed9c12 --- M js/lib/mediawiki.WikitextSerializer.js 1 file changed, 13 insertions(+), 2 deletions(-) Approvals: Subramanya Sastry: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/34666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic71e384b89241cf96bbff2186d2ea19945ed9c12 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: GWicke <[email protected]> Gerrit-Reviewer: GWicke <[email protected]> Gerrit-Reviewer: Subramanya Sastry <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
