mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Implement module import rejection
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
4cd0da1e07
commit
1a51cff06d
4 changed files with 15 additions and 9 deletions
|
|
@ -607,17 +607,19 @@ static bool evalScript(ContextRef* context, StringRef* source, StringRef* srcNam
|
|||
puts(evalResult.resultOrErrorToString(context)->toStdUTF8String().data());
|
||||
}
|
||||
|
||||
bool result = true;
|
||||
while (context->vmInstance()->hasPendingJob()) {
|
||||
auto jobResult = context->vmInstance()->executePendingJob();
|
||||
if (shouldPrintScriptResult) {
|
||||
if (shouldPrintScriptResult || jobResult.error) {
|
||||
if (jobResult.error) {
|
||||
fprintf(stderr, "Uncaught %s:\n", jobResult.resultOrErrorToString(context)->toStdUTF8String().data());
|
||||
result = false;
|
||||
} else {
|
||||
fprintf(stderr, "%s\n", jobResult.resultOrErrorToString(context)->toStdUTF8String().data());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return result;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue