mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 650965 Permaorange, logging for Fennec's extension manager r=wesj
This commit is contained in:
parent
633ec13004
commit
dc8fd85183
@ -59,6 +59,11 @@ XPCOMUtils.defineLazyGetter(this, "AddonRepository", function() {
|
||||
return AddonRepository;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "AddonLogger", function() {
|
||||
Cu.import("resource://gre/modules/AddonLogging.jsm");
|
||||
return LogManager.getLogger("FennecExtensions");
|
||||
});
|
||||
|
||||
var ExtensionsView = {
|
||||
_strings: {},
|
||||
_list: null,
|
||||
@ -447,6 +452,7 @@ var ExtensionsView = {
|
||||
uninstall: function ev_uninstall(aItem) {
|
||||
let opType;
|
||||
if (aItem.getAttribute("type") == "search") {
|
||||
AddonLogger.log("Removing search engine.");
|
||||
// Make sure the engine isn't hidden before removing it, to make sure it's
|
||||
// visible if the user later re-adds it (works around bug 341833)
|
||||
aItem._engine.hidden = false;
|
||||
@ -454,7 +460,10 @@ var ExtensionsView = {
|
||||
// the search-engine-modified observer in browser.js will take care of
|
||||
// updating the list
|
||||
} else {
|
||||
AddonLogger.log("Removing extension.");
|
||||
|
||||
if (!aItem.addon) {
|
||||
AddonLogger.log("No addon object, early return.");
|
||||
this._list.removeChild(aItem);
|
||||
return;
|
||||
}
|
||||
@ -463,6 +472,7 @@ var ExtensionsView = {
|
||||
opType = this._getOpTypeForOperations(aItem.addon.pendingOperations);
|
||||
|
||||
if (aItem.addon.pendingOperations & AddonManager.PENDING_UNINSTALL) {
|
||||
AddonLogger.log("Add-on is not restartless. Keeping in list.");
|
||||
this.showRestart();
|
||||
|
||||
// A disabled addon doesn't need a restart so it has no pending ops and
|
||||
@ -472,6 +482,7 @@ var ExtensionsView = {
|
||||
|
||||
aItem.setAttribute("opType", opType);
|
||||
} else {
|
||||
AddonLogger.log("Add-on is restartless. Removed from list.");
|
||||
this._list.removeChild(aItem);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user