From acf1ca5525f51e4b68407fe38575b9c2ec49e289 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Mon, 22 May 2017 14:01:19 -0400 Subject: [PATCH] Bug 1358073 - Handle destruction of scope data correctly r=shu a=abillings --- js/src/vm/Scope.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/vm/Scope.cpp b/js/src/vm/Scope.cpp index 28c9cd06dc91..efd49ce4761a 100644 --- a/js/src/vm/Scope.cpp +++ b/js/src/vm/Scope.cpp @@ -565,7 +565,7 @@ LexicalScope::XDR(XDRState* xdr, ScopeKind kind, HandleScope enclosing, { auto deleteOnLeave = MakeScopeExit([&data]() { if (mode == XDR_DECODE) - js_delete(data.get()); + DeleteScopeData(data.get()); }); uint32_t firstFrameSlot; @@ -877,7 +877,7 @@ VarScope::XDR(XDRState* xdr, ScopeKind kind, HandleScope enclosing, { auto deleteOnLeave = MakeScopeExit([&data]() { if (mode == XDR_DECODE) - js_delete(data.get()); + DeleteScopeData(data.get()); }); uint8_t needsEnvironment;