Closed Bug 1240615 Opened 9 years ago Closed 9 years ago

Make PushService protocol init method return a Promise

Categories

(Core :: DOM: Notifications, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(1 file)

For Android GCM-based Push, it's possible for the set of known PushService registrations to change without Gecko being aware; and it's possible that Fennec can't initialize the GCM layer, so that DOM push should be unavailable. This is not anticipated, but it can happen: for example, due to local device corruption; or due to the Google Play Services not being present on the device. Therefore, when the PushService starts up, it should wait for the protocol to initialize successfully before finishing its own initialization.
I'd like to make `PushService.init` fallible, but it's not obvious how to act on failure. This patch at least allows each service to block _startService until service-specific work initialization is complete. Review commit: https://reviewboard.mozilla.org/r/31315/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/31315/
Attachment #8709174 - Flags: review?(kcambridge)
Comment on attachment 8709174 [details] MozReview Request: Bug 1240615 - Make PushService protocol init method return a Promise. r?kitcambridge https://reviewboard.mozilla.org/r/31315/#review28141 Thanks, Nick!
Attachment #8709174 - Flags: review?(kcambridge) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: