Bug 295680 - extension should not install when chrome registration fails - patch by Robert Strong <rob_strong@exchangecode.com>, r+a=bsmedberg

git-svn-id: svn://10.0.0.236/trunk@175289 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bsmedberg%covad.net
2005-06-29 13:58:16 +00:00
parent 6024389839
commit 916e67370a
2 changed files with 13 additions and 0 deletions

View File

@@ -1553,7 +1553,13 @@ Installer.prototype = {
"Failure exception: " + e);
showMessage("malformedRegistrationTitle", [], "malformedRegistrationMessage",
[BundleManager.appName]);
var stageFile = this._installLocation.getStageFile(this._id);
if (stageFile)
this._installLocation.removeFile(stageFile);
StartupCache.put(this._installLocation, this._id, OP_NEEDS_UNINSTALL, true);
StartupCache.write();
}
},
@@ -1611,7 +1617,13 @@ Installer.prototype = {
"Failure exception: " + e);
showMessage("malformedRegistrationTitle", [], "malformedRegistrationMessage",
[BundleManager.appName]);
var stageFile = this._installLocation.getStageFile(this._id);
if (stageFile)
this._installLocation.removeFile(stageFile);
StartupCache.put(this._installLocation, this._id, OP_NEEDS_UNINSTALL, true);
StartupCache.write();
}
},

View File

@@ -501,6 +501,7 @@ extern "C" void RunInstallOnThread(void *data)
#ifdef MOZ_XUL_APP
if (NS_SUCCEEDED(hZip->Test("install.rdf")))
{
hZip->Close();
// appears to be an Extension Manager install
nsIExtensionManager* em = installInfo->GetExtensionManager();
if (em)