Subj : RE: disabling toString() and toSource() for functions To : netscape.public.mozilla.jseng From : Merten Schumann Date : Wed Jan 19 2005 11:22 am Hm, interesting. Just tried it in Rhino, it works, code of my "hidden" functions is printend. So users can see what internal variables and all I do use there ... Hmmm. Would be really nice to have something to prevent this toString()/toSource() stuff, if needed! By overloading the toString()/toSource() or so, but how to do this for functions? Something like the ClassShutter mechanism would be helpful ... cu Merten > -----Original Message----- > From: mozilla-jseng-admin@mozilla.org > [mailto:mozilla-jseng-admin@mozilla.org] On Behalf Of Brendan Eich > Sent: Tuesday, January 18, 2005 3:46 AM > To: mozilla-jseng@mozilla.org > Subject: Re: disabling toString() and toSource() for functions > > bubbfree@gmail.com wrote: > > I have some encrypted functions that users can load into > the scripting > > environment (decrypted before passing onto SpiderMonkey of course). > > > > Is there a way to disable the toString() and toSource() > functions for > > these imported functions? So that users can't see the source code of > > those functions? > > > No, not just for those functions. You would have to meddle with the > guts of the code that run for all functions converted to string or to > source. > > /be > _______________________________________________ > mozilla-jseng mailing list > mozilla-jseng@mozilla.org > http://mail.mozilla.org/listinfo/mozilla-jseng > .