From 5faa5c4d1dc4bdf9f94894343bac03f4fedc0954 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 8 Nov 2026 16:34:49 -0800 Subject: [PATCH] JavaScript: JSON.parse releases its text before the reviver runs The text is rooted and held only while the parse runs. A reviver can use the room the text took. --- crates/js/src/builtins/json.rs | 19 ++++++++++--------- crates/js/src/builtins_tests.rs | 8 ++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/crates/js/src/builtins/json.rs b/crates/js/src/builtins/json.rs index 14c370f03..4375303fe 100644 --- a/crates/js/src/builtins/json.rs +++ b/crates/js/src/builtins/json.rs @@ -162,15 +162,16 @@ fn parse(interp: &mut Interp, _: Value, args: &[Value], _: bool) -> JsResult