QV4: Fix JS stack overflow when parsing JSON


Deeply nested JSON would have caused repeated JS stack reservations,
until finally hitting the guard page (after which a subsequent write to
that memory would cause the application to be killed).

Fix that by reusing the scoped object, instead of creating a new one in
every loop iteration.

Task-number: QTBUG-151146
Pick-to: 6.12 6.8 6.5 5.15
Change-Id: Iaf0b9f78ccef765c9730802d9cdcaf89149ff432
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
commite3548c16e184cbc961496448450d8dc855b436ec
parent0a47c2821cde7c09ae2922202b67fae67403fc4b
authorFabian Kosmale <fabian.kosmale@qt.io>
committerFabian Kosmale <fabian.kosmale@qt.io>
commit timeTue, 20 Oct 2026 17:56:10 +0000