Re: [v8-users] How to cancel a promise execution

2021-02-09 Thread bambam
Hello Robin, Thank you for your reply! Let me give you a more detailed explanation: the untrusted code snippet I run is always inside of an async function, so what I do is running multiples async functions concurrently inside of the same v8::Isolate (every time this async code execution is tri

Re: [v8-users] How to cancel a promise execution

2021-02-08 Thread Robin R.
Hey there, I think you may want to give v8::V8::TerminateExecution() a shot. It throws an uncatchable exception in your JavaScript code. I think Cloudflare workers terminated the execution after 30 seconds. However, I'm not sure if all Promises run in the same execution context in your Isolate.