[Webkit-unassigned] [Bug 203401] [GTK] Clear JSCContext exception before evaluating new code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 6 01:14:06 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=203401

--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Sorry for the delay to reply. let me clarify how this is supposed to work:

What jsc_context_get_exception() is the last unhandled (or uncaught) exception. You can handle exceptions in two different ways:
 1- Just checking if there's an uncaught exception after a call, and then calling jsc_context_clear_exception() to indicate it has been handled. Or you can avoid calling the clear() is you just checked the exception but didn't actually handled it.

 2- By pushing an exception handler with jsc_context_push_exception_handler(). In this case, the exception is considered to be handled by the handler, but if you don't want to handle it you can call jsc_context_throw_exception() from the callback to indicate it hasn't been handled.

I suggest you to use jsc_context_push_exception_handler() is that's more convenient to you for handling exceptions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191106/9c5e4032/attachment-0001.htm>


More information about the webkit-unassigned mailing list