mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Update public API & Remove SandBoxStack (#469)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
ba161d7459
commit
be2e01a807
9 changed files with 41 additions and 21 deletions
|
|
@ -23,12 +23,26 @@
|
|||
#include "runtime/Environment.h"
|
||||
#include "runtime/EnvironmentRecord.h"
|
||||
#include "runtime/NativeFunctionObject.h"
|
||||
#include "runtime/VMInstance.h"
|
||||
#include "parser/Script.h"
|
||||
#include "interpreter/ByteCode.h"
|
||||
#include "interpreter/ByteCodeInterpreter.h"
|
||||
|
||||
namespace Escargot {
|
||||
|
||||
SandBox::SandBox(Context* s)
|
||||
: m_context(s)
|
||||
{
|
||||
m_oldSandBox = m_context->vmInstance()->m_currentSandBox;
|
||||
m_context->vmInstance()->m_currentSandBox = this;
|
||||
}
|
||||
|
||||
SandBox::~SandBox()
|
||||
{
|
||||
ASSERT(m_context->vmInstance()->m_currentSandBox == this);
|
||||
m_context->vmInstance()->m_currentSandBox = m_oldSandBox;
|
||||
}
|
||||
|
||||
void SandBox::processCatch(const Value& error, SandBoxResult& result)
|
||||
{
|
||||
ExecutionState state(m_context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue