From 546bdbcf6acaffc3ab8d94274f291393d621b596 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 29 Jul 2016 14:11:52 +0200 Subject: [PATCH] 'Sandboxed' property isn't properly propagated to child frames refs #12247 --- lib/base/scriptframe.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/base/scriptframe.cpp b/lib/base/scriptframe.cpp index c9aec385c..3526c08d4 100644 --- a/lib/base/scriptframe.cpp +++ b/lib/base/scriptframe.cpp @@ -28,6 +28,11 @@ boost::thread_specific_ptr > ScriptFrame::m_ScriptFram ScriptFrame::ScriptFrame(void) : Locals(new Dictionary()), Self(ScriptGlobal::GetGlobals()), Sandboxed(false), Depth(0) { + std::stack *frames = m_ScriptFrames.get(); + + if (frames && !frames->empty()) + Sandboxed = frames->top()->Sandboxed; + PushFrame(this); }