[Jslib] Newbie question - jslib in xpcshell on windows

Chris Rose Chris.Rose at synopsys.com
Thu Apr 20 08:34:55 EDT 2006

Hello all, 

Please forgive a novice question.  I've been trying to use jslib
functions in a firefox extension I'm working on, and, having failed
that, am now trying to debug my jslib use in xpcshell.  

I reinstalled mozilla, and then downloaded the static version of jslib
from here;


and fed that into the address line of a mozilla session, then exited
mozilla and restarted.

I can get the jslib splash screen by starting mozilla thusly;
"C:\Program Files\mozilla.org\mozilla\mozilla.exe" -jslib
but once I click on that splash image, the mozilla process dies (I can
see it dissappear off of my task manager.) Not sure why.

If I launch xpcshell.exe, then try to follow the demo from this page;


here is what is happening for me;

js> var myProfile="C:\\Program
js> load (myProfile);
xpcShell loading ... chrome/jslib/debug/debug.js
xpcShell loading ... chrome/jslib/modules.js
js> include (jslib_file); 
xpcShell loading ... chrome/jslib/io/file.js
xpcShell loading ... chrome/jslib/io/filesystem.js
js> var f1=new File(E:\\f1.txt.out');
typein:13: ReferenceError: File is not defined

So, is there something else I need to do to register the jslib packages?
Is there some way to specify which chrome I want xpcshell to use, for
instance?  (Is it possible it could be using the chrome from my parallel
firefox installation, which does not (yet) have jslib (static version)
installed?  I can look under C:\Program
Files\mozilla.org\mozilla\chrome\jslib\  and see all the source code for
jslib there. 

Any help or info would be GREATLY APPRECIATED, SINCERELY.


Christopher M. Rose              Email: cmr at synopsys.com
Synopsys Professional Services   Phone: (508) 263-8181
377 Simarano Drive, Suite 300    Fax:   (508) 263-8017
Marlboro, MA 01752               Cell:  (401) 258-9631

More information about the Jslib mailing list