Closed Bug 2068765 Opened 2 months ago Closed 2 months ago

Basic parsing for Declarative Web Push

Categories

(Core :: DOM: Push Subscriptions, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: ltenenbaum, Assigned: ltenenbaum)

References

(Blocks 1 open bug)

Details

Attachments

(2 external files)

Implementing a bare-minimum version of the declarative push message parser to detect and process valid DWPs.

Feedback for general design:

For the parsing, we could either introduce a Rust component for push, then use serde_json for parsing (and define the data structure declaratively), or use a JS component as PushCrypto does (although I want to replace it with rust-ece to share more code with the Android code path). I would prefer Rust given rust-ece.

About the notification creation, I think NotificationParent is not a good place to put it as it's intended to be an actor. If we need some shared code path then we should extract it to a separate module.

Thoughts?

Flags: needinfo?(ltenenbaum)

That sounds good! It would definitely be nicer to use serde_json instead of the JSON handler API. And generally I'm in favour of using Rust for more things :)

NotificationParent has some permission checking and creates the alert and NotificationObserver from the IPCNotificationOptions, but I think we can move that to NotificationUtils.cpp or something. I'll file a bug about it.

Flags: needinfo?(ltenenbaum)
Depends on: 2069065
Blocks: 2071415
Blocks: 2071417
Blocks: 2071418
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/49931ce023e4 https://hg.mozilla.org/integration/autoland/rev/f6a50dcf6d0e Revert "Bug 2068765 - Part 2: Create notification from Declarative Web Push. r=saschanaz" for causing bustages in Declarative.cpp.
Flags: needinfo?(ltenenbaum)
Pushed by abutkovits@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ef7de3078534 https://hg.mozilla.org/integration/autoland/rev/367b29d1845c Revert "Bug 2068765 - Part 2: Create notification from Declarative Web Push. r=saschanaz" for causing failures complaining about Declarative web push.
Flags: needinfo?(ltenenbaum)

Ah, we should disable it for android for now, it doesn't support the current WPT infra.

Flags: needinfo?(ltenenbaum)
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
QA Whiteboard: [qa-triage-done-c159/b158]
Regressions: 2092093
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: