From b625b36e62975412011300f539ec0b190c493a5b Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Tue, 31 Mar 2009 22:21:07 +0100 Subject: [PATCH] Bug 486195: getItemLocation on WinRegInstallLocation should return a clone of the item location. r=robstrong --- toolkit/mozapps/extensions/src/nsExtensionManager.js.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolkit/mozapps/extensions/src/nsExtensionManager.js.in b/toolkit/mozapps/extensions/src/nsExtensionManager.js.in index 818adf6f3769..f7491f117503 100644 --- a/toolkit/mozapps/extensions/src/nsExtensionManager.js.in +++ b/toolkit/mozapps/extensions/src/nsExtensionManager.js.in @@ -1249,7 +1249,7 @@ DirectoryInstallLocation.prototype = { * See nsIExtensionManager.idl */ getItemFile: function DirInstallLocation_getItemFile(id, filePath) { - var itemLocation = this.getItemLocation(id).clone(); + var itemLocation = this.getItemLocation(id); var parts = filePath.split("/"); for (var i = 0; i < parts.length; ++i) itemLocation.append(parts[i]); @@ -1478,7 +1478,7 @@ WinRegInstallLocation.prototype = { }, getItemLocation: function RegInstallLocation_getItemLocation(id) { - return this._IDToDirMap[id]; + return this._IDToDirMap[id].clone(); }, getIDForLocation: function RegInstallLocation_getIDForLocation(dir) { @@ -1486,7 +1486,7 @@ WinRegInstallLocation.prototype = { }, getItemFile: function RegInstallLocation_getItemFile(id, filePath) { - var itemLocation = this.getItemLocation(id).clone(); + var itemLocation = this.getItemLocation(id); var parts = filePath.split("/"); for (var i = 0; i < parts.length; ++i) itemLocation.append(parts[i]);