What you are looking for is not cancelling a promise, but stopping code execution. JS is not concurrent, so rejecting or cancelling (which does not exist for JS promises) wouldn't help.
Take a look at v8::Isolate::TerminateExecution Cheers, Yang On Mon, 8 Feb 2021, 23:34 bambam, <[email protected]> wrote: > Hello guys... I'm embedding the V8 into my own application to run some > untrusted code concurrently. Every untrusted code is executed inside a > promise and when any of these codes blocks the system (by doing a > while(true){} for example) I need to stop it. So, I've been trying to find > a way of canceling JS promises but I haven't found anything useful. Does > anyone here know where I could find some related information? > > -- > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > --- > You received this message because you are subscribed to the Google Groups > "v8-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-dev/6a499919-362f-48f9-8651-f8644f584255n%40googlegroups.com > <https://groups.google.com/d/msgid/v8-dev/6a499919-362f-48f9-8651-f8644f584255n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAFSTc_gsNnAsRx3kNwqRgZrAL-sWKYSsbrq5RFQ3yi%2BUkwmh-g%40mail.gmail.com.
