Closed Bug 1308633 Opened 9 years ago Closed 9 years ago

Receiving a push notification while Fennec is not running causes a crash

Categories

(Core :: DOM: Push Subscriptions, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: droeh, Assigned: droeh)

Details

Attachments

(1 file)

If we receive a push notification while Fennec is not running, we crash in NotificationClient.showNotification(), as GeckoAppShell.getGeckoInterface() is null. To reproduce: Run the demo at https://serviceworke.rs/push-simple_demo.html and leave enough time to kill Fennec in the app switcher before the notification arrives.
This patch just uses empty strings for the package name and class name in cases where we cannot get the ComponentName. It's probably not a great solution, so I'm open to other suggestions/ideas.
Attachment #8799040 - Flags: review?(nchen)
Comment on attachment 8799040 [details] [diff] [review] Fail (somewhat) gracefully if we can't get ComponentName Review of attachment 8799040 [details] [diff] [review]: ----------------------------------------------------------------- Use AppConstants.ANDROID_PACKAGE_NAME and AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS as defaults.
Attachment #8799040 - Flags: review?(nchen) → review+
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8e6738db2f92 Use predefined strings for package name and class name when we cannot get the ComponentName in NotificationClient.showNotification. r=jchen
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: