showNotification should be rejected with a TypeError when permission is revoked after renderer-side check |
|||
Issue descriptionRight now we do reject the promise, but we should also be throwing a TypeError exception as per the spec: https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-shownotification Step 5.1: "If permission for notification’s origin is not "granted", then reject promise with a TypeError exception, and abort these steps."
,
Apr 16 2018
Aha, yes you're right, that catches it in the standard case, thanks for pointing that out. However there's an edge case where permission is revoked after that but before the notification is displayed. Pre-mojo we simply return without sending a message back to the renderer: https://cs.chromium.org/chromium/src/content/browser/notifications/notification_message_filter.cc?l=132 (won't this mean the promise is never resolved? I'm a little confused by this) Once they go through mojo by default, instead we currently just reject with no explanation: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/notifications/notification_manager.cc?l=159 Updated the bug title to make this explicit.
,
Nov 21
***Mass UI Triage*** |
|||
►
Sign in to add a comment |
|||
Comment 1 by hs1217....@samsung.com
, Apr 16 2018