From 7f539c548cf0dc755f1d8d47b7aa8514a7d268f7 Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Wed, 8 Feb 2006 17:09:51 +0000 Subject: [PATCH] Bug 326274 - 2 In install.rdf Breaks reinstallation. r=mconnor --- toolkit/mozapps/extensions/src/nsExtensionManager.js.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/toolkit/mozapps/extensions/src/nsExtensionManager.js.in b/toolkit/mozapps/extensions/src/nsExtensionManager.js.in index 51b80529686d..b079a1140f26 100644 --- a/toolkit/mozapps/extensions/src/nsExtensionManager.js.in +++ b/toolkit/mozapps/extensions/src/nsExtensionManager.js.in @@ -660,9 +660,12 @@ function getManifestProperty(installManifest, property) { * returns TYPE_EXTENSION if attempts to determine the type fail. */ function getAddonTypeFromInstallManifest(installManifest) { - var type = getManifestProperty(installManifest, "type"); - if (type !== undefined) - return type; + var target = installManifest.GetTarget(gInstallManifestRoot, + gRDF.GetResource(EM_NS("type")), true); + if (target) { + var type = stringData(target); + return type === undefined ? intData(target) : parseInt(type); + } // Firefox 1.0 and earlier did not support addon-type annotation on the // Install Manifest, so we fall back to a theme-only property to