Open Bug 1252660 Opened 8 years ago Updated 1 year ago

Move main-thread `PushManager` implementation into C++


(Core :: DOM: Push Subscriptions, task, P5)





(Reporter: lina, Unassigned)


(Blocks 3 open bugs)


(Whiteboard: btpp-fixlater)

The main-thread `PushManager` is currently implemented in `Push.js`, whereas the worker thread implementation lives in `PushManager.cpp`. This is the only JS-implemented interface in Push; `PushSubscription` and `PushMessageData` are already in C++.

There's a fair bit of duplication between the two (especially after bug 1247685), and I've noticed some inconsistencies around error reporting. As it stands, any WebIDL changes require updating both files.

If the main-thread implementation were rewritten in C++, I think it would be easier to maintain. OTOH, if we don't anticipate many changes to `PushManager`, maybe we can leave it be. Something to think about, though.
Whiteboard: btpp-fixlater
Blocks: 1450827
Priority: -- → P5
Blocks: 1497430
Blocks: 1497427

It seems the JS part lives now in Push.jsm but the hybrid implementation is still there, IIUC. Not sure if this is really something to worry about, though?

Type: defect → task
Flags: needinfo?(bugmail)

The situation does seem the same as when this bug was filed, yes.

I would say this doesn't need to currently be a direct priority, but that we should keep the bug around as a means of expressing when having only a single code path would make other bugs simpler (ex: bug 1497430 which depends on this bug) or where other bugs are only really feasible when fixing this bug.

Flags: needinfo?(bugmail)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.