Hi Paul,

You could try using v8::Isolate::TerminateExecution(). It's a best-effort
approach to limit further JS execution and allocations.

cheers,
Camillo

On Tue, 21 Mar 2023 at 08:00, Paul Harris <harris...@gmail.com> wrote:

> Hi again,
>
> Is there a nice way I could cancel a JS execution (eg raise an exception)
> from within eg the NearHeapCallback to avoid OOMs?
>
> I'd rather if the script is consuming more RAM than expected, that it
> raises exceptions and unwinds rather than bombing out.
>
> Thanks,
> Paul
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> 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 v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/9b1749b5-ccda-4a74-b846-d0347121c7fen%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/9b1749b5-ccda-4a74-b846-d0347121c7fen%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
Camillo Bruni |  Software Engineer, V8 |  Google Germany GmbH |  Erika-Mann
Str. 33, 80636 München

Registergericht und -nummer: Hamburg, HRB 86891 | Sitz der Gesellschaft:
Hamburg | Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Diese E-Mail ist vertraulich. Falls Ssie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.  This e-mail is
confidential. If you received this communication by mistake, please don't
forward it to anyone else, please erase all copies and attachments, and
please let me know that it has gone to the wrong person.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAOeS1i_3OhVn1vacQ4N2jJRH3idQG1kLFoW5Hu23CUWQx0i99w%40mail.gmail.com.

Reply via email to