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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 24 23:58:14 PDT 2019


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

            Bug ID: 203401
           Summary: [GTK] Clear JSCContext exception before evaluating new
                    code
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcrha at redhat.com
                CC: bugs-noreply at webkitgtk.org

This is more a question than a request:

Should the jsc_context_evaluate_* functions clear the context's exception (jsc_context_clear_exception()) before running the new code?

The use case:

I read multiple files into the context using jsc_context_evaluate_with_source_uri(). I do not check the result, it's not interesting for me in this case, but I check jsc_context_get_exception() after the call and if it is set, then I print it on the console, thinking that it belongs to the last call. The thing is, when the load of the first file fails with an exception, I print the same exception for the other files as well, even they do not belong to them.

I can call jsc_context_clear_exception() after such each exception print (and I will), but I'm think it would be better if JSCContext takes care of the exception on its own.

Similarly with webkit_web_view_run_javascript(), it should clear the exception before the code is called too, I believe.

-- 
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/20191025/6e8e6c7b/attachment.htm>


More information about the webkit-unassigned mailing list