Closed Bug 873134 Opened 11 years ago Closed 11 years ago

Notify install success before starting to download package

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla24

People

(Reporter: ferjm, Assigned: ferjm)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

mozIDOMApplicationRegistry2.installPackage is supposed to trigger the DOMRequest.onsuccess callback and mozIDOMApplicationMgmt.oninstall event *before* starting to download the package of the app. We are currently not doing it :(.

To be honest, I don't even know how is this currently working for Gaia :\
Assignee: nobody → ferjmoreno
No longer blocks: b2g-apps-v1-next
blocking-b2g: --- → tef?
Actually, I'd like to know how Gaia is working before nominating for tef+
blocking-b2g: tef? → ---
Attached patch Fix (obsolete) — Splinter Review
Julien would be a good person to ask about that.
Flags: needinfo?(felash)
Well, I'm quite sure it works in gaia :)

but I follow your reasoning, Fabrice should know better.
Flags: needinfo?(felash) → needinfo?(fabrice)
So it seems that this is working on b2g18 but not in m-i, birch or m-c. The reason seems to be Bug 856131
Attached patch v1Splinter Review
Attachment #750538 - Attachment is obsolete: true
Attachment #750992 - Flags: review?(fabrice)
Attachment #750992 - Flags: feedback?(jhugman)
Flags: needinfo?(fabrice)
With the attached patch we notify via 'mgmt.oninstall' and 'DOMRequest.onsuccess' as soon as the app is stored in the apps registry for both, hosted and packaged apps. This way consumers of the mgmt API will receive the app object along with the 'mgmt.oninstall' event and will be able to listen to the package download events as expected.
 
James, I am not sure if you expect 'aInstallSuccessCallback' to be fired along with the 'oninstall' and the 'DOMRequest.onsuccess' events or once the package download is completed.
Blocks: 821589
aInstallSuccessCallback is supposed to be called after the end of the download.
Ok, thanks James. That's the way the attached patch works.
Attachment #750992 - Flags: review?(fabrice)
Attachment #750992 - Flags: review+
Attachment #750992 - Flags: feedback?(jhugman)
Keywords: regression
https://hg.mozilla.org/mozilla-central/rev/aca56671754a
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
No longer blocks: b2g-apps-v1-next
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: