[Webkit-unassigned] [Bug 215877] [GLIB] No way to determine if an exception has been thrown calling jsc_value_object_invoke_methodv

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 27 03:25:53 PDT 2020


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

--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Gratton from comment #2)
> So I've just found `jsc_context_get_exception` and
> `jsc_context_clear_exception`, which helps (just)! There are some problems
> with this however:
> 
>  1. It is racy between invocations

What's racy?

>  2. There's no documentation about when it's valid to call either method, if
> the latter needs to be called and if so, when

You can check if there's an exception being raised in the context, and you can clear ii to "handle" it, if it's not fatal, to ensure new exceptions are thrown.

>  3. There is no documentation to suggest this is actually useful for the use
> case above

What use case exactly?

>  4. No members are ever set when this object is non-null due to an exception
> being thrown after call to `jsc_value_object_invoke_methodv` - name,
> source-uri, etc are always null, line and column numbers are always 0
> (they're not even -1, since these are uints)

What's the script name and row/column of a method called by jsc_value_object_invoke_methodv?

> So aside from the fixes needed for (2)-(4), consider this a feature request
> for an API that doesn't have the limitations of (1). Thanks!

I don't understand the limitations, could you elaborate? Maybe a test case would help me to understand the issue.

-- 
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/20200827/dfef0a0d/attachment.htm>


More information about the webkit-unassigned mailing list