]> err.no Git - sope/blob - Recycler/NGJavaScript/TODO
necessary changes
[sope] / Recycler / NGJavaScript / TODO
1 # $Id$
2
3 in common.h, correctly detect NG_VARARGS_AS_REFERENCE for gcc 3
4   - how do we detect gcc3 ?
5
6
7 - add a .jobs like file for mapping selectors to functions instead of
8   special _jsfunc_, _jsprop_ selectors
9
10
11 Find out the difference between NGJavaScriptObject and 
12 NGJavaScriptObjectHandler
13 => document NGJavaScriptObject
14 - the handler seems to be stored in the JS private field ?
15
16 NGJavaScriptObjectHandler
17 - is attached to a SpiderMonkey finalizer
18   - the finalizer func gets the handler reference from the JS private
19   - the managedObject should be active there
20   - the finalizer calls forgetObject: on the context
21     - forgetObject: removes the object from the objcToJS hash
22     - objcToJS retains the object
23 - is created in NGJavaScriptObjectMappingContext -proxyForObject:
24 - is created in makeObjectCombined
25
26 BUG
27 - Note: do not mix up the mapping context and the JS context
28   - we are talking about the NGJavaScriptObjectMappingContext, not about
29     the JS context (which is retained by the mapping context)
30 - sometimes a context is collected earlier than a NGJavaScriptObjectHandler,
31   AFAIK the handler is registered inside the context and therefore can't
32   retain it (otherwise we would have a retain cycle)
33   - so either the context does not invalidate the object handlers
34   - or we have some handler which does not properly unregisters
35   - or something else :-(
36   Result:
37   ---snip---
38   Reason: message 'forgetObject:' sent to freed object 0x811a4d4 \
39     (NGJavaScriptObjectMappingContext)
40   ---snap---
41   - hm, but NGJavaScriptObject retains the context ?