JSONovich / jsonovich

A webextension for Firefox. Pretty-prints JSON content in the browser for easy, unobtrusive viewing.
https://addons.mozilla.org/firefox/addon/jsonovich/
Mozilla Public License 2.0
7 stars 3 forks source link

Move modules towards Cu.import and away from loadSubScript #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Starting in Firefox 8, the current method we use for loading code modules 
(mozIJSSubScriptLoader.loadSubScript) will be changing to use the startup 
cache. This is good for speed but makes deploying restartless updates difficult.

Fortunately, Firefox 7 introduces a new Cu.unload method that reverses 
Cu.import. This makes the main reason for using loadSubScript go away.

To retain backwards compatibility (and minimize code changes), we should modify 
our existing require function to support either system by feature-detecting and 
preferring Cu.unload.

Original issue reported on code.google.com by W.Elwoo...@gmail.com on 31 Jul 2011 at 7:33

GoogleCodeExporter commented 9 years ago

Original comment by W.Elwoo...@gmail.com on 31 Jul 2011 at 7:37

GoogleCodeExporter commented 9 years ago
After some investigation (and in retrospect, common sense), the startup cache 
is cleared when an addon is updated so restartless updates should continue to 
work. In addition, Cu.import already uses the startup cache, so switching to it 
would not be advantageous in this case.

Original comment by W.Elwoo...@gmail.com on 8 Oct 2011 at 9:46