Subj : Can not use RegExp with sealed shared top scope To : netscape.public.mozilla.jseng From : k0t1k@mac.com Date : Wed Jul 06 2005 06:13 pm I am trying to use shared top scope in the way suggested http://www.mozilla.org/rhino/scopes.html top_scope = cx.initStandardObjects( null, false ); ... loading some shared JS variables/functions ... top_scope.sealObject(); Then I am creating multiple scopes like this scope = (ScriptableObject)cx.newObject( top_scope ); scope.setPrototype( top_scope ); scope.setParentScope( null ); >From this point on, I can load/execute any JS using scope object, unless these scripts are using RegExp. If I am trying to create RegExp variable ( for example something like this : 'var re1 = new RegExp( "/>(?:\s+)