Closed Bug 1222867 Opened 9 years ago Closed 9 years ago

micro-optimize reference-counting for WebSocketFrame objects

Categories

(Core :: Networking: WebSockets, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(2 files)

      No description provided.
The result of CreateFrameIfNeeded is always assigned to a RefPtr, so we
can save a little code space by moving the AddRef into the callee,
rather than doing it in the caller.
Attachment #8684727 - Flags: review?(mcmanus)
WebSocketFrames are created only to be transferred in to
WebSocketEventService::Frame{Sent,Received}, where a strong reference is
taken to them by a runnable posted to the main thread.  Let's avoid an
extra AddRef/Release cycle by passing through already_AddRefed
structures.
Attachment #8684728 - Flags: review?(mcmanus)
Attachment #8684727 - Flags: review?(mcmanus) → review?(michal.novotny)
Attachment #8684728 - Flags: review?(mcmanus) → review?(michal.novotny)
Attachment #8684728 - Flags: review?(michal.novotny) → review+
Attachment #8684727 - Flags: review?(michal.novotny) → review+
https://hg.mozilla.org/mozilla-central/rev/a96097c7f612
https://hg.mozilla.org/mozilla-central/rev/2d6c2b2974e9
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: