diff --git a/lib/Parser/Parse.cpp b/lib/Parser/Parse.cpp
index 57cacaeab35..ad76de6a752 100644
--- a/lib/Parser/Parse.cpp
+++ b/lib/Parser/Parse.cpp
@@ -13995,6 +13995,7 @@ void Parser::ReleaseTemporaryGuestArena()
if (this->m_scriptContext != nullptr)
{
this->m_scriptContext->ReleaseTemporaryGuestAllocator(m_tempGuestArena);
+ m_tempGuestArena.Unroot();
}
m_tempGuestArenaReleased = true;
diff --git a/lib/Runtime/Base/ScriptContext.h b/lib/Runtime/Base/ScriptContext.h
index 122a2ae1820..0860ba0d7a9 100644
--- a/lib/Runtime/Base/ScriptContext.h
+++ b/lib/Runtime/Base/ScriptContext.h
@@ -2034,16 +2034,10 @@ namespace Js
ArenaAllocator * allocator = nullptr;
#define ACQUIRE_TEMP_GUEST_ALLOCATOR(allocator, scriptContext, name) \
- TryFinally([&]() \
- { \
- tempGuest##allocator = scriptContext->GetTemporaryGuestAllocator(name); \
- allocator = tempGuest##allocator->GetAllocator();
+ tempGuest##allocator = scriptContext->GetTemporaryGuestAllocator(name); \
+ allocator = tempGuest##allocator->GetAllocator();
#define RELEASE_TEMP_GUEST_ALLOCATOR(allocator, scriptContext) \
- }, \
- [&](bool /*hasException*/) \
- { \
- if (tempGuest##allocator) \
- scriptContext->ReleaseTemporaryGuestAllocator(tempGuest##allocator); \
- });
+ if (tempGuest##allocator) \
+ scriptContext->ReleaseTemporaryGuestAllocator(tempGuest##allocator);
diff --git a/test/Array/rlexe.xml b/test/Array/rlexe.xml
index bb31a119e3f..6981f724a4a 100644
--- a/test/Array/rlexe.xml
+++ b/test/Array/rlexe.xml
@@ -646,6 +646,7 @@
memset_invariant.js
Slow
-mic:1 -off:simplejit -mmoc:0 -off:JITLoopBody
+ 300