Bug 1853305 - Part 2: Use AutoSelectGCHeap in JSON parsing r=sfink
commitc6bd0193a5f55538502c9af220bb7bb1b95534b4
authorJon Coppeard <jcoppeard@mozilla.com>
Mon, 18 Sep 2023 08:32:55 +0000 (18 08:32 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Mon, 18 Sep 2023 08:32:55 +0000 (18 08:32 +0000)
tree90911d8691364f8c55c8ea76f410c89d6794097f
parent51405c5297f29f76fe7af9f29fd4c15d0c655093
Bug 1853305 - Part 2: Use AutoSelectGCHeap in JSON parsing r=sfink

This replaces the current logic with use of the new class.

I had to change some of the JSONParser construction because I got warnings
about RAII classes being used as temporaries. This should construct the parser
directly in the Rooted now rather than copying it.

Differential Revision: https://phabricator.services.mozilla.com/D188334
js/src/builtin/Eval.cpp
js/src/builtin/JSON.cpp
js/src/vm/JSONParser.cpp
js/src/vm/JSONParser.h