Closed Bug 1891705 Opened 11 months ago Closed 4 months ago

showNotification resolves too early

Categories

(Core :: DOM: Notifications, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1928702

People

(Reporter: saschanaz, Assigned: saschanaz)

References

Details

Attachments

(1 obsolete file)

The spec says resolve the promise after fetch and show steps: https://notifications.spec.whatwg.org/#dom-serviceworkerregistration-shownotification

  1. Run these steps in parallel:
    1. If the result of getting the notifications permission state is not "granted", then queue a global task on the DOM manipulation task source given global to reject promise with a TypeError, and abort these steps.
    2. Run the fetch steps for notification.
    3. Run the show steps for notification.
    4. Queue a global task on the DOM manipulation task source given global to resolve promise with undefined.
  2. Return promise.

But we currently resolve the promise immediately inside the function. https://searchfox.org/mozilla-central/rev/77f8c66362e5f18f8e7cbaf1ba3ed6286f203d33/dom/notification/Notification.cpp#2224

Severity: -- → S3
Priority: -- → P3
Attachment #9396962 - Attachment description: WIP: Bug 1891705 → Bug 1891705 - Resolve Promise on alertshow/finished r=asuth
Attachment #9396962 - Attachment is obsolete: true

Bug 1928702 fixed this.

Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1928702
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: