Re: Updating a JavaScript module (jsm)
Michael Hofer <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
I'm having the same problem as Georg 2 years ago (see unanswered post
below) since I upgraded from xulrunner 1.9.2 to 2.0.
I can't effectively update my JSM modules anymore. I'm importing the
modules with
Components.utils.import("resource://...")
from different places in my code (from xbl or regular js files). But the
modules seem to be cached somewhere in between restarts of xulrunner
(Where?). Changes in the JSM are ignored. I can even delete the
.jsm-Files and everything still works. (Changing the resource file name
in the import command to some unknown filename DOES give an error -> so
the import statement is executed.)
"nglayout.debug.disable_xul_cache" and
"nglayout.debug.disable_xul_fastload" are set to true.
(I'm on Mac OS X, installed via --install-app and replaced the Resources
directory with a symlink to my development source. This setup worked
fine before 2.0.)
Any ideas?
regards,
Michael
Am 01.11.09 20:01, schrieb Georg Maaß:
> Hi,
>
> I'm not sure whether my Question belongs to the JavaScript engine or to
> XulRunner.
>
> When updating a JavaScript module (jsm file) of a XulRunner application
> (not of XulRunner it self) what must be done to make it work? Is this
> similar to components, where I have to touch a magic .autoreg file, or
> is there an other mechanism for JavaScript modules?
>
> Updating the file and just restarting the application is not enough. The
> application still sees the old implementation of the JavaScript module.
> So the cache seems to live longer than XulRunner is running. Touching
> the .autoreg files does not help.
>
> Updating the file and replacing XulRunner with a different nightly of
> Xulrunner and then starting the application works, but this is probably
> not the official way. So what is the official way to update a JavaScript
> module?
>
> How do you make your changes during development take effect?
> _______________________________________________
> dev-tech-xul mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-xul