[webkit-dev] JavaScriptCore question

Rolando Abarca m at rolando.cl
Sat Dec 17 11:10:43 PST 2011


On Fri, Dec 16, 2011 at 9:13 AM, Oliver Hunt <oliver at apple.com> wrote:

>
> This looks like you're storing the JSContextRef you receive when your
> callback is called.  That's incorrect as a given JSContextRef is only
> guaranteed to be valid within the callback.  All your functions should be
> from the same initial JSGlobalContextRef you created when initialising your
> environment, and you should just be using that GlobalContext rather than
> any per instance context.
>

Excellent! the globalContext worked just fine :)


> You should also be protecting the function with JSValueProtect.
>

Ok, thanks. I'll keep that piece then.


> Hopefully this helps.
>

It sure did.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111217/f92b0e6e/attachment.html>


More information about the webkit-dev mailing list