Closed
Bug 1377215
Opened 7 years ago
Closed 7 years ago
Add WebSocketEventService::Get
Categories
(Core :: Networking: WebSockets, enhancement)
Core
Networking: WebSockets
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: farre, Assigned: farre)
References
Details
(Whiteboard: [necko-active])
Attachments
(1 file, 1 obsolete file)
1.57 KB,
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
For the cases where we really only need to get ahold of a WebSocketEventService if there is one.
Assignee | ||
Comment 1•7 years ago
|
||
Assignee: nobody → afarre
Attachment #8882297 -
Flags: review?(mcmanus)
Updated•7 years ago
|
Whiteboard: [necko-active]
Comment 2•7 years ago
|
||
Comment on attachment 8882297 [details] [diff] [review] 0001-Bug-1377215-Add-WebSocketEventService-Get.-r-mcmanus.patch Review of attachment 8882297 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/protocol/websocket/WebSocketEventService.cpp @@ +206,5 @@ > +WebSocketEventService::Get() > +{ > + MOZ_ASSERT(NS_IsMainThread()); > + > + return gWebSocketEventService.forget(); This patch seems to call forget(), which will set gWeb* to null, in a method named get() (which wouldn't normally have a side effect..) maybe you just want GetOrCreate() ?
Attachment #8882297 -
Flags: review?(mcmanus) → review-
Assignee | ||
Comment 3•7 years ago
|
||
I really do want ::Get that explicitly doesn't create. I'm going to use Get before calling HasListenerFor, and if the case is that there is no service I don't want to create it since, then there won't be any listeners to begin with but I'll end up with a service that isn't actually used. So it's just me being stupip, I should've gone through a RefPtr as with GetOrCreate.
Attachment #8882297 -
Attachment is obsolete: true
Attachment #8882591 -
Flags: review?(mcmanus)
Updated•7 years ago
|
Attachment #8882591 -
Flags: review?(mcmanus) → review+
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/454598683af7 Add WebSocketEventService::Get. r=mcmanus
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/454598683af7
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•