Browse Source

Merge pull request #1423 from KhalilBellakrid/develop

Avoid stack overflow when calling execute method of NJSExecutionContext
master
Thibaut 7 years ago
committed by GitHub
parent
commit
25ae4e2ce5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/helpers/init-libcore.js

3
src/helpers/init-libcore.js

@ -24,7 +24,8 @@ const stringToBytesArray = str => Array.from(Buffer.from(str))
const NJSExecutionContextImpl = { const NJSExecutionContextImpl = {
execute: runnable => { execute: runnable => {
try { try {
runnable.run() const runFunction = () => runnable.run()
setImmediate(runFunction)
} catch (e) { } catch (e) {
logger.log(e) logger.log(e)
} }

Loading…
Cancel
Save