[Jslib] Uninstall UI

Pete Collins pete at mozdev.org
Fri Dec 5 19:42:04 EST 2003


> The only JS solution I found so far is to fake a low memory condition -
> the JAR cache will only then be emptied. Since Mozilla isn't very
> responsive afterwards ;-), it has to be shut down.
> 
> See especially the function RemoveDeletableFiles:
> <http://www.mozdev.org/lxr/http/source/mnenhy/src/bin/chrome/mnenhy/content/mnenhy/mnenhy-uninstall.js#L230>
> 
> (This is checked in, but not yet available in official Mnenhy builds.)

I just tried the new jslib uninstall on Windows and everything works 
perfectly. The only thing is the jar will remain undeleted due to the 
fact that if the jar is cached in memory, the filehandle remains open 
even though we closed all the windows.

I think the solution is using nsIZIpReaderCache to get the nsIZipReader 
for the jar and then calling close() on the target mypackage.jar file.

I'll try it out. This one file deletion is only an issue on windows.

--pete

-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com



More information about the Jslib mailing list