Closed Bug 1058180 Opened 10 years ago Closed 10 years ago

Only create app migration observer component when absolutely needed

Categories

(Core Graveyard :: DOM: Apps, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S5 (26sep)

People

(Reporter: qdot, Assigned: qdot)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 1 obsolete file)

Currently, we create an app migration component on profile-after-change, even in cases where we aren't in an upgrade path. We should be able to create one via a contract id only when upgrade is needed, saving us having the object possibly hanging around when not needed.
Whiteboard: [systemsfe]
Comment on attachment 8489568 [details] [diff] [review]
Patch 1 (v1) - Only create app migrator when absolutely needed

Review of attachment 8489568 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/apps/Webapps.jsm
@@ +650,3 @@
>          // Run migration before uninstall of core apps happens.
> +        var appMigrator = Components.classes["@mozilla.org/app-migrator;1"]
> +                           .createInstance(Components.interfaces.nsIObserver);      

nit: trailing whitespace.
Attachment #8489568 - Flags: review?(fabrice) → review+
Target Milestone: --- → 2.1 S5 (26sep)
This is just a cleanup bug. Does not need aurora uplift.
Backed out in https://hg.mozilla.org/integration/b2g-inbound/rev/5f06a3b5fd42 due to causing desktop to crash. Whoops.
Backed out patch did not check for validity of requested appMigrator object. It just created it and tried to run it. Since migrators only exist on b2g, that was a bad idea. Retrying with new patch that actually does a validity check.

https://hg.mozilla.org/try/rev/20214cb35305
(In reply to Kyle Machulis [:kmachulis] [:qdot] (USE NEEDINFO?) from comment #4)
> https://hg.mozilla.org/integration/b2g-inbound/rev/6d28e030fd7b

Note this also broke the webappstartup test on Autophone. Kyle, do you have a link to the try builds?
see comment 8
Flags: needinfo?(kyle)
Oh, yeah, sorry, pasted the wrong link in. Retried with a small change, still blew up everything.

https://tbpl.mozilla.org/?tree=Try&rev=e0206ab2d81d
Flags: needinfo?(kyle)
New try, wrapping migration block in try/catch so we can just continue on errors.

https://tbpl.mozilla.org/?tree=Try&rev=c6ae131f903f
Just putting in for rereview to make sure fabrice is ok with the new error handling.
Attachment #8489568 - Attachment is obsolete: true
Attachment #8493566 - Flags: review?(fabrice)
Kyle, this new build still breaks webappstartup on at least Android 2.3 on a Samsung Galaxy GS 2. You can find the apk and instructions on how to run the test in bug 1062097.
snorp, this is currently breaking webappstartup. Can you take a look at the patch?
Attachment #8493566 - Flags: review?(fabrice) → review+
(In reply to Bob Clary [:bc:] from comment #13)
> Kyle, this new build still breaks webappstartup on at least Android 2.3 on a
> Samsung Galaxy GS 2. You can find the apk and instructions on how to run the
> test in bug 1062097.

Which new build? The one in Comment 11?
Flags: needinfo?(bclary)
Kyle, yes that build but I just retested it and found that it worked fine. Not sure why I thought it failed this morning, but I made sure to reboot between steps this time and I'm not as tired.
Flags: needinfo?(bclary)
https://hg.mozilla.org/mozilla-central/rev/7e1f36eba077
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 1093721
Depends on: 1074988
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: