зеркало из https://github.com/mozilla/pjs.git
Bug 375805 - ExtensionManager.prototype._shutdown shouldn' t call gOS.removeObserver(this, 'profile-after-change') unless ExtensionManager.prototype.observe(subject, 'app-startup', data) has been called. r=sspitzer
This commit is contained in:
Родитель
35eda97993
Коммит
daa2f75864
|
@ -83,7 +83,8 @@ var gLoggingEnabled = null;
|
|||
function LOG(string) {
|
||||
if (gLoggingEnabled) {
|
||||
dump("*** " + string + "\n");
|
||||
gConsole.logStringMessage(string);
|
||||
if (gConsole)
|
||||
gConsole.logStringMessage(string);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,6 +224,7 @@ Blocklist.prototype = {
|
|||
case "app-startup":
|
||||
gOS.addObserver(this, "plugins-list-updated", false);
|
||||
gOS.addObserver(this, "profile-after-change", false);
|
||||
gOS.addObserver(this, "quit-application", false);
|
||||
break;
|
||||
case "profile-after-change":
|
||||
gLoggingEnabled = getPref("getBoolPref", PREF_EM_LOGGING_ENABLED, false);
|
||||
|
@ -234,10 +236,12 @@ Blocklist.prototype = {
|
|||
case "plugins-list-updated":
|
||||
this._checkPluginsList();
|
||||
break;
|
||||
case "quit-application":
|
||||
gOS.removeObserver(this, "plugins-list-updated");
|
||||
gOS.removeObserver(this, "profile-after-change");
|
||||
gOS.removeObserver(this, "quit-application");
|
||||
case "xpcom-shutdown":
|
||||
gOS.removeObserver(this, "xpcom-shutdown");
|
||||
gOS.removeObserver(this, "profile-after-change");
|
||||
gOS.removeObserver(this, "plugins-list-updated");
|
||||
gOS = null;
|
||||
gPref = null;
|
||||
gConsole = null;
|
||||
|
|
|
@ -533,7 +533,8 @@ function removeDirRecursive(dir) {
|
|||
function LOG(string) {
|
||||
if (gLoggingEnabled) {
|
||||
dump("*** " + string + "\n");
|
||||
gConsole.logStringMessage(string);
|
||||
if (gConsole)
|
||||
gConsole.logStringMessage(string);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2409,6 +2410,7 @@ ExtensionManager.prototype = {
|
|||
switch (topic) {
|
||||
case "app-startup":
|
||||
gOS.addObserver(this, "profile-after-change", false);
|
||||
gOS.addObserver(this, "quit-application", false);
|
||||
break;
|
||||
case "profile-after-change":
|
||||
this._profileSelected();
|
||||
|
@ -2419,6 +2421,9 @@ ExtensionManager.prototype = {
|
|||
case "offline-requested":
|
||||
this._confirmCancelDownloadsOnOffline(subject);
|
||||
break;
|
||||
case "quit-application":
|
||||
gOS.removeObserver(this, "profile-after-change");
|
||||
gOS.removeObserver(this, "quit-application");
|
||||
case "xpcom-shutdown":
|
||||
this._shutdown();
|
||||
break;
|
||||
|
@ -2532,7 +2537,6 @@ ExtensionManager.prototype = {
|
|||
*/
|
||||
_shutdown: function() {
|
||||
gOS.removeObserver(this, "xpcom-shutdown");
|
||||
gOS.removeObserver(this, "profile-after-change");
|
||||
|
||||
// Release strongly held services.
|
||||
gOS = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче