Subj : SpiderMonkey's serialization/deserialization To : netscape.public.mozilla.jseng From : anton muhin Date : Tue Sep 14 2004 10:46 pm Hello, gurus! I need to solve the following problem. I need to save compilied JS scripts that use some native objects implemented by me and, of course, standard native objects. The reason for storing is quite simple---I want to save compiled scripts to bypass later parsing & compilation. I'm going to achieve the goal in the following way: after I compile the script I want to save global object of the appropriate context. The first question is if this is right way to move? The second question: if I store the global object, are the references to native objects' methods (both standard ones and implemented by me) stored correctly? I suppose the answer is yes due to highly dynamic nature of JavaScript, but just in case. And if the previous statement is true, does it mean that, except for the cases then I define some properties as instances of my native classes on global object or objects referenced from the global, I actually don't need to implement XDR API for my native classes as all these objects whould be constructed during execution of the compiled script? And the last question: grepping through the SM's sources shows that only a few of SM's native objects implement XDR API. Is it known limitation or nobody needs this API for the reasons above. I beg your pardon, if it's just stupid questions. with the best regards, anton. .