mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1058180 - Only create app migrator when absolutely needed; r=fabrice
This commit is contained in:
parent
a8622d36ab
commit
13cbe85c1e
@ -27,8 +27,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "appsService",
|
||||
"nsIAppsService");
|
||||
|
||||
function B2GAppMigrator() {
|
||||
Services.obs.addObserver(this, kMigrationMessageName, false);
|
||||
Services.obs.addObserver(this, "xpcom-shutdown", false);
|
||||
}
|
||||
|
||||
B2GAppMigrator.prototype = {
|
||||
@ -119,11 +117,6 @@ B2GAppMigrator.prototype = {
|
||||
switch (topic) {
|
||||
case kMigrationMessageName:
|
||||
this.executeBrowserMigration();
|
||||
Services.obs.removeObserver(this, kMigrationMessageName);
|
||||
break;
|
||||
case "xpcom-shutdown":
|
||||
Services.obs.removeObserver(this, kMigrationMessageName);
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
break;
|
||||
default:
|
||||
debug("Unhandled topic: " + topic);
|
||||
|
@ -108,5 +108,5 @@ contract @mozilla.org/services/mobileid-ui-glue;1 {83dbe26a-81f3-4a75-9541-3d0b7
|
||||
|
||||
# B2GAppMigrator.js
|
||||
component {7211ece0-b458-4635-9afc-f8d7f376ee95} B2GAppMigrator.js
|
||||
contract @mozilla.org/b2g-app-migrator;1 {7211ece0-b458-4635-9afc-f8d7f376ee95}
|
||||
category profile-after-change B2GAppMigrator @mozilla.org/b2g-app-migrator;1
|
||||
contract @mozilla.org/app-migrator;1 {7211ece0-b458-4635-9afc-f8d7f376ee95}
|
||||
|
||||
|
@ -661,9 +661,10 @@ this.DOMApplicationRegistry = {
|
||||
} catch(e) {} // getCharPref will throw on non-b2g platforms. That's ok.
|
||||
|
||||
if (runUpdate) {
|
||||
|
||||
// Run migration before uninstall of core apps happens.
|
||||
Services.obs.notifyObservers(null, "webapps-before-update-merge", null);
|
||||
var appMigrator = Components.classes["@mozilla.org/app-migrator;1"]
|
||||
.createInstance(Components.interfaces.nsIObserver);
|
||||
appMigrator.observe(null, "webapps-before-update-merge", null);
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
yield this.installSystemApps();
|
||||
|
Loading…
Reference in New Issue
Block a user