Bug 1853305 - Part 2: Use AutoSelectGCHeap in JSON parsing r=sfink
commita615c25b00cffd816bf920888c02fde43942e4d1
authorJon Coppeard <jcoppeard@mozilla.com>
Mon, 18 Sep 2023 12:10:33 +0000 (18 12:10 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Mon, 18 Sep 2023 12:10:33 +0000 (18 12:10 +0000)
treee3edb801756a7486acf2ff0042385cc11eb046f1
parenta91c4e75d7eb3ebf650263c7caf6587486df6ae9
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