Browse Source
Avoid stack overflow when calling execute method of NJSExecutionContext
master
KhalilBellakrid
7 years ago
committed by
Thibaut Boustany
No known key found for this signature in database
GPG Key ID: 32475B11A2B13EEC
1 changed files with
2 additions and
1 deletions
-
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) |
|
|
} |
|
|
} |
|
|