Closed
Bug 1079198
Opened 10 years ago
Closed 8 years ago
Refactor MozLoopService.jsm
Categories
(Hello (Loop) :: Client, defect, P4)
Hello (Loop)
Client
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
backlog | tech-debt |
People
(Reporter: mikedeboer, Unassigned)
References
Details
(Whiteboard: [tech-debt])
It's starting to look like a monstrous beast with a scary head and a loooooooong tail.
So why not chop it into smaller pieces and perhaps - even - document _at least_ the public API?
Who's with me?
Ps.: consistent code formatting and moar use of Task.async() would make me yay even more!
Flags: firefox-backlog+
Updated•10 years ago
|
Flags: qe-verify?
Reporter | ||
Updated•10 years ago
|
Flags: qe-verify? → qe-verify-
Reporter | ||
Updated•10 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•10 years ago
|
||
My main complaints with MozLoopService.jsm are:
* the globals e.g. gHawkClient which should be members on an object e.g. MozLoopServiceInternal so they're easier to access from tests
* the separation between MozLoopService and MozLoopServiceInternal is a footgun because people get |this| mixed up (e.g. bug 1071835), makes things harder to test and doesn't actually prevent access to internal state. Properties on the current *Internal can be prefixed with an underscore instead.
Note that more files == more compartments so we shouldn't split it too much.
I think it would be okay to do this once we're done development on 35 (i.e. 36+) including all uplifts otherwise it will cause uplift hell and slow us down.
Comment 2•10 years ago
|
||
The various bits of registration code need to be cleaned up (at least renamed) as they are quite confusing:
register => promiseRegisteredWithServers => onPushRegistered => registerWithLoopServer
The middle two above are related to the push server but the 2nd doesn't mention push in the name, the last is for the loop server and the first is a talking about Loop in general I guess.
Then there is also gRegisteredDeferred which is created in promiseRegisteredWithServers (for push registration) but gets resolved when loop registration completes. I don't think onPushRegistered should call registerWithLoopServer directly so we can properly fix bug 1076428 since right now it doesn't know whether to do a Guest or FxA registration.
The way some of the mock objects are passed around multiple levels is also messy IMO. I would rather those are set as a global or a property.
Updated•10 years ago
|
Whiteboard: [tech-debt]
Updated•10 years ago
|
backlog: --- → Fx36+
Updated•10 years ago
|
backlog: Fx36+ → Fx37+
Updated•10 years ago
|
backlog: Fx37+ → Fx38?
Comment 3•10 years ago
|
||
Moving these to blocking-loop="tech-debt" so they can be triaged against other tech debt bugs. When we take a tech-debt bug to work on - just mark it "firefox-backlog"+ and give priority. Then we'll pull it during iteration planning (or factor it into workload if someone is already working on).
backlog: Fx38? → tech-debt
Updated•10 years ago
|
Rank: 45
Priority: -- → P4
Reporter | ||
Comment 5•9 years ago
|
||
Yes, MozLoopService is still a mess, sort of.
Flags: needinfo?(mdeboer)
Comment 6•8 years ago
|
||
Support for Hello/Loop has been discontinued.
https://support.mozilla.org/kb/hello-status
Hence closing the old bugs. Thank you for your support.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•