mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +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
|
|
@ -2248,11 +2248,12 @@ NEVER_INLINE Value ByteCodeInterpreter::tryOperation(ExecutionState*& state, siz
|
|||
newState->ensureRareData()->m_controlFlowRecord = state->rareData()->m_controlFlowRecord;
|
||||
}
|
||||
newState->m_inTryStatement = oldInTryStatement;
|
||||
newState->context()->m_sandBoxStack.back()->fillStackDataIntoErrorObject(val);
|
||||
|
||||
newState->context()->vmInstance()->currentSandBox()->fillStackDataIntoErrorObject(val);
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (getenv("DUMP_ERROR_IN_TRY_CATCH") && strlen(getenv("DUMP_ERROR_IN_TRY_CATCH"))) {
|
||||
ErrorObject::StackTraceData* data = ErrorObject::StackTraceData::create(newState->context()->m_sandBoxStack.back());
|
||||
ErrorObject::StackTraceData* data = ErrorObject::StackTraceData::create(newState->context()->vmInstance()->currentSandBox());
|
||||
StringBuilder builder;
|
||||
builder.appendString("Caught error in try-catch block\n");
|
||||
data->buildStackTrace(newState->context(), builder);
|
||||
|
|
@ -2260,7 +2261,7 @@ NEVER_INLINE Value ByteCodeInterpreter::tryOperation(ExecutionState*& state, siz
|
|||
}
|
||||
#endif
|
||||
|
||||
newState->context()->m_sandBoxStack.back()->m_stackTraceData.clear();
|
||||
newState->context()->vmInstance()->currentSandBox()->m_stackTraceData.clear();
|
||||
if (!code->m_hasCatch) {
|
||||
newState->rareData()->m_controlFlowRecord->back() = new ControlFlowRecord(ControlFlowRecord::NeedsThrow, val);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue