Compare commits

..

No commits in common. "af4c40ce41e84901ab6668f1ee98d24915defbf7" and "25dae5441008df0f866abe2ddca94e28bc05b77b" have entirely different histories.

5
qjs.c
View file

@ -528,12 +528,11 @@ int main(int argc, char **argv)
"globalThis.global = globalThis;\n" "globalThis.global = globalThis;\n"
"global.console.error = console.log\n" "global.console.error = console.log\n"
"global.console.warn = console.log\n" "global.console.warn = console.log\n"
"globalThis.break = () => { throw new Error('Break'); };\n"
"\n" "\n"
"if (typeof os !== 'undefined') {\n" "if (typeof os !== 'undefined') {\n"
" globalThis.sleep = os.sleep;\n" " globalThis.sleep = os.sleep;\n"
" async function setTimeout2(func, ms) {globalThis.clearTimeout = false; await sleep(ms); if (!clearTimeout) { func(); } }\n" " async function setTimeout(func, ms) { await sleep(ms); return func(); }\n"
" globalThis.setTimeout = setTimeout2\n" " globalThis.setTimeout = setTimeout\n"
"} else {\n" "} else {\n"
" console.error('os is not defined.');\n" " console.error('os is not defined.');\n"
"}\n" "}\n"