Subj : Re: Can not use RegExp with sealed shared top scope To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Sun Jul 10 2005 10:31 am Well, that's exactly what I do with shared top scopes -- force resolving of the lazy objects prior to sealing the scope. I guess that's something that you just learn to live with. Attila. On Thu, 07 Jul 2005 02:44:09 +0200, k0t1k@mac.com wrote: > The second I post my initial message, I figure out what is going on. > It is all due to the LazilyLoadedCtor. Unless I "use/mention" RegExp ( > or any other things from ScriptRuntime.lazilyNames ) before I seal > top_scope, I can not use any of these functions. They are not "loaded" > as part of Context.initStandardObject(), but only on a first use. > > I guess the question is, does this approach ( Lazily Loading ) save so > much time/memory/cpu that it really worth the efforts? I guess if you > create many "top" scopes, it could become expensive, but "shared" top > scope solves this problem rather nicely. > -- home: http://www.szegedi.org weblog: http://www.jroller.com/page/aszegedi .