mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Check values of getenv() for validity
Signed-off-by: Ryan Choi <ryan.h.choi@gmail.com>
This commit is contained in:
parent
25588dcb01
commit
99b2d0f8ce
4 changed files with 11 additions and 5 deletions
|
|
@ -2277,7 +2277,8 @@ NEVER_INLINE Value ByteCodeInterpreter::tryOperation(ExecutionState*& state, siz
|
|||
newState->context()->vmInstance()->currentSandBox()->fillStackDataIntoErrorObject(val);
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (getenv("DUMP_ERROR_IN_TRY_CATCH") && strlen(getenv("DUMP_ERROR_IN_TRY_CATCH"))) {
|
||||
char* dumpErrorInTryCatch = getenv("DUMP_ERROR_IN_TRY_CATCH");
|
||||
if (dumpErrorInTryCatch && (strcmp(dumpErrorInTryCatch, "1") == 0)) {
|
||||
ErrorObject::StackTraceData* data = ErrorObject::StackTraceData::create(newState->context()->vmInstance()->currentSandBox());
|
||||
StringBuilder builder;
|
||||
builder.appendString("Caught error in try-catch block\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue