Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIXMEs #14

Open
samdeane opened this issue May 24, 2014 · 1 comment
Open

FIXMEs #14

samdeane opened this issue May 24, 2014 · 1 comment

Comments

@samdeane
Copy link
Contributor

I'm trying to get down to 0 warnings. If there's anything I can do to help with the #FIXME items in the code, let me know.

This one sounds easy enough, but I'm not sure what it should do if the function is nil.

#pragma message "FIXME: Check to see if function is nil or not."

Similarly, this one could do with a bit more explanation:

#pragma message "FIXME: we should stash a weak ref to the COScript at creation time, because who knows what other COScript might be around"

Of course it may be that it would take more time to explain what needs doing than to do it - in which case ignore me and close this ;)

@ccgus
Copy link
Owner

ccgus commented May 24, 2014

The first one should probably throw an error (a JS exception at least).

The for the second one- the problem is that when callAction: is used, it looks at the current thread and whatever COScript is around and uses that jscontext. That's a bad idea if it's not the context which the COSTarget was created for. So initWithJSFunction: should somehow grab the current COScript that it's executing in and stash that in a weak ivar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants