Memory Management for nsIScriptContext: Difference between revisions

m (Reverted edit of Partgtiwa, changed back to last version by RyanJones)
 
Line 12: Line 12:


* We can not have the memory management functions exclusively on nsIScriptContext.  There is code that currently stores a |void *| script object, but has no nsIScriptContext available.  One example is nsJSEventListener, which stores the |void *|, but has the |nsIScriptContext| provided as part of invoking the event.  nsJSEventListener would not want to store an nsIScriptContext just to free the script object.  Another example is the XUL cache which will be extended to cache all languages, but will not want to store an nsIScriptContext just to handle cache shutdown.
* We can not have the memory management functions exclusively on nsIScriptContext.  There is code that currently stores a |void *| script object, but has no nsIScriptContext available.  One example is nsJSEventListener, which stores the |void *|, but has the |nsIScriptContext| provided as part of invoking the event.  nsJSEventListener would not want to store an nsIScriptContext just to free the script object.  Another example is the XUL cache which will be extended to cache all languages, but will not want to store an nsIScriptContext just to handle cache shutdown.
[http://hostgator1centcoupon.net/ Hostgator VPS Coupon]
[http://hostgator-reseller-coupon.com/ Hostgator Reseller Coupon]
[http://hostgator-vps-coupon.net/ Hostgator 1 cent coupon]


* Linkage issues mean that "helper functions" are unsuitable for use here.  As the DOM implementation and each language implementation are individual components, public static functions are not globally reachable.  Either xpcom interfaces or fully inline C++ classes can be used to assist with these tasks.
* Linkage issues mean that "helper functions" are unsuitable for use here.  As the DOM implementation and each language implementation are individual components, public static functions are not globally reachable.  Either xpcom interfaces or fully inline C++ classes can be used to assist with these tasks.
4

edits