From d4ccb07cf63feff92ea8a4b156551b8364b1a933 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 27 Nov 2020 17:21:11 +0100 Subject: [PATCH] [spidermonkey] Delete ac2 (AutoCompartment) --- src/ecmascript/spidermonkey.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ecmascript/spidermonkey.c b/src/ecmascript/spidermonkey.c index 3503a0c17..1b58186a7 100644 --- a/src/ecmascript/spidermonkey.c +++ b/src/ecmascript/spidermonkey.c @@ -333,8 +333,8 @@ spidermonkey_put_interpreter(struct ecmascript_interpreter *interpreter) if (!js_module_init_ok) return; ctx = interpreter->backend_data; - if (interpreter->ac) { - //delete (JSAutoCompartment *)interpreter->ac; + if (interpreter->ac2) { + delete (JSAutoCompartment *)interpreter->ac2; } if (interpreter->ar) { delete (JSAutoRequest *)interpreter->ar; @@ -342,6 +342,7 @@ spidermonkey_put_interpreter(struct ecmascript_interpreter *interpreter) // JS_DestroyContext(ctx); interpreter->backend_data = NULL; interpreter->ac = nullptr; + interpreter->ac2 = nullptr; interpreter->ar = nullptr; }