diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2025-03-27 15:34:20 +0100 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2025-03-27 15:34:20 +0100 |
commit | d045a13b4be31f490c972887ae7464aabcad991a (patch) | |
tree | aac803e3a51d72d5927013f591657fd2f19e8222 /repl.js | |
parent | e8cfe8fede99abe00bf677cc3c9c1a9de273a125 (diff) | |
download | quickjs-d045a13b4be31f490c972887ae7464aabcad991a.tar.gz quickjs-d045a13b4be31f490c972887ae7464aabcad991a.zip |
disable rejection tracker in the repl - repl cleanup
Diffstat (limited to 'repl.js')
-rw-r--r-- | repl.js | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1098,24 +1098,20 @@ import * as os from "os"; } mexpr = ""; - eval_and_print_start(expr, true); + eval_and_print_start(expr); return true; } - function eval_and_print_start(expr, is_async) { + function eval_and_print_start(expr) { var result; try { eval_start_time = os.now(); /* eval as a script */ - result = std.evalScript(expr, { backtrace_barrier: true, async: is_async }); - if (is_async) { - /* result is a promise */ - result.then(print_eval_result, print_eval_error); - } else { - print_eval_result({ value: result }); - } + result = std.evalScript(expr, { backtrace_barrier: true, async: true }); + /* result is a promise */ + result.then(print_eval_result, print_eval_error); } catch (error) { print_eval_error(error); } |