Closed Bug 863598 Opened 12 years ago Closed 12 years ago

SimplePush: Make PushService a real service (jsm)

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18+ fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)

RESOLVED FIXED
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 + fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: nsm, Assigned: nsm)

References

Details

(Whiteboard: [fixed-in-birch])

Attachments

(2 files, 2 obsolete files)

PushService is currently implemented as a component. 1) This causes the JS file to be loaded in every process that starts on B2G. PushService is about 40k and its imports add more text. Converting to a jsm loaded only in shell.js will result in memory reduction. 2) This is required for PushService to be able to use the AlarmService in its current state. (Filing follow up). @dougt: I am not inclined to agree about PushService leaks on desktop. On a recent m-c checkout, there were no increased leaks due to conversion to PushService. In addition nothing stands out specific to push in shutdown leak logs. Can you reproduce again?
Landing this will NOT affect firefox23 desktop since https://hg.mozilla.org/mozilla-central/rev/fc8267682725 disabled Push on non-b2g platforms.
No longer blocks: 863599
Attached patch Make PushService a module (obsolete) (deleted) — Splinter Review
Attachment #739510 - Flags: review?(doug.turner)
Comment on attachment 739510 [details] [diff] [review] Make PushService a module Review of attachment 739510 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/push/src/PushService.js @@ +427,5 @@ > + > + Services.obs.addObserver(this, "profile-change-teardown", false); > + Services.obs.addObserver(this, "network-interface-state-changed", > + false); > + Services.obs.addObserver(this, "webapps-uninstall", false); do we no longer have to worry about any of this?
Turns out that PushService as a component is also created, and app-startup called, but it seems like gecko content processes don't receive final-ui-startup, even though they receive app-startup, which stops multiple push services from being created.
Attachment #739510 - Flags: review?(doug.turner) → review+
Attached patch Make PushService a module (deleted) — Splinter Review
Moved some of the shutdown code from bug 863599 here for more coherence. Carrying r=dougt forward.
Attachment #739510 - Attachment is obsolete: true
Attachment #744462 - Flags: review+
Fix up changes against current b2g18.
Attachment #741140 - Attachment is obsolete: true
Attachment #741140 - Flags: review?(doug.turner)
Attachment #744468 - Flags: review+
Desktop does leak. https://tbpl.mozilla.org/?tree=Try&rev=9023d1b1a8e0 No reason to backout since push is disabled in m-c, but need to track this down.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment on attachment 744468 [details] [diff] [review] Make PushService a module - patch for b2g18 [Approval Request Comment] Bug caused by (feature/regressing bug #): 822712 User impact if declined: No user impact. Reduces memory consumption and prevents per process loading of the Push Service. Required change to use Alarms API in Push (see bug 863732). Testing completed: Yes. Operating with change on local devices for 2 weeks. Risk to taking this patch (and alternatives if risky): Very low. String or UUID changes made by this patch: Removes a JS component.
Attachment #744468 - Flags: approval-mozilla-b2g18?
Attachment #744468 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
And a bustage fix since b2g18 still packages PushService with the browser too. https://hg.mozilla.org/releases/mozilla-b2g18/rev/15cc47992c6e
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: