[webkit-dev] JSC: Callback functions returning exception, what should be the JSValueRef return?

Brian Barnes ggadwa at charter.net
Tue Aug 11 11:13:21 PDT 2009


Darin Adler wrote:
> The design is that the return value is ignored. In theory, you can 
> safely return anything, even a garbage pointer.
>
>     -- Darin
>
>
Just so I get the concept (how exceptions are handled is one of the 
places that is completely different in Spidermonkey so it's one of the 
biggest hurdles for me) -- when the class based SET property or a STATIC 
FUNCTION is called, it detects when an exception is thrown by my 
replacement of the JSValueRef *exception, correct?  There's nothing else 
I have to trigger (in SM you have to implicitly trigger by calling a 
function.)

Also, when an exception I create reaches the top (where I originally 
called into the script with JSObjectCallAsFunction) how can I determine 
the line number where the exception happened?  I can't seem to find this 
in the docs either.  If I have to do this when I create the exception, 
that is also fine.

[>] Brian




More information about the webkit-dev mailing list