Closed Bug 1240615 Opened 5 years ago Closed 5 years ago
Service protocol init method return a Promise
MozReview Request: Bug 1240615 - Make PushService protocol init method return a Promise. r?kitcambridge
58 bytes, text/x-review-board-request
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)
https://hg.mozilla.org/projects/cedar/rev/e81adecdc007349bb9063ed65be5b32842bf439d Bug 1240615 - Make PushService protocol init method return a Promise. r?kitcambridge
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+
You need to log in before you can comment on or make changes to this bug.