On 12 Feb., 21:21, [EMAIL PROTECTED] wrote: > > In fact I'm already using a subclass of ImporterTopLevel (which > provides package management and some other facilities) as my global > scope, so it is easy to identify. I'm afraid however that I have been > unable to accomplish what you've described. I've subclassed > ScriptableOutputStream to replace my global scope with a proxy object, > and yet this is not reducing the size of my serialized session at all. > I've instrumented my ScriptableOutputStream to log all of the objects > it is asked to replace, and from this log it seems clear that the > objects in the global scope (compiled functions mostly) to which my > session is maintaining references are still being offered for > serialization even though their parent scope is stubbed with the > proxy.
Serialization can be a real pain to debug. If the global scope is excluded, I guess you must have some other references to these functions/objects. Do you have any idea where these references come from? Looking at the log of objects passed to the replace method may help you here. > In my subclassed replaceObject method, is there any way that I can > identify that the object being offered for replacement has the global > scope as its ultimate parent, and to serialize instead something that > will allow me to recover the analogous reference in another > (identical) global scope? Any help is sincerely appreciated. Maybe, but the better solution is to identify the reference that causes an object to be included, and try to cut it right there. Hannes _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
