Count open WebSockets owned by an nsGlobalWindow

RESOLVED FIXED in Firefox 57

Status

()

enhancement
RESOLVED FIXED
2 years ago
a month ago

People

(Reporter: farre, Assigned: farre)

Tracking

unspecified
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
To be able to not throttle timeouts in the TimeoutManager when there are active web sockets, we need to keep tabs on the amount of websockets opened, as well as closed.
(Assignee)

Updated

2 years ago
Assignee: nobody → afarre
Blocks: 1377766
Comment on attachment 8900294 [details] [diff] [review]
0001-Bug-1393056-Make-it-possible-to-count-open-WebSocket.patch

Shouldn't we count this per top level inner window, similar to IDB connection.
We're supposed to throttle or not-throttle tabs after all, not some iframes in tabs, as far as I know.
Attachment #8900294 - Flags: feedback?(bugs) → feedback-
(Assignee)

Updated

2 years ago
Depends on: 1393359
Comment on attachment 8903194 [details] [diff] [review]
0001-Bug-1393056-Make-it-possible-to-count-open-WebSocket.patch

In general, could you use -p -U 8 when generating patches.
Attachment #8903194 - Flags: review?(bugs) → review+

Comment 5

2 years ago
Pushed by afarre@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/448006f5fb18
Make it possible to count open WebSockets on the main thread. r=smaug
(Assignee)

Updated

2 years ago
No longer depends on: 1393359

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/448006f5fb18
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57

Updated

2 years ago
Depends on: 1396368
Was the intention in this bug to avoid only budget based throttling of sites using websocket?  It seems this bug did not prevent our normal 1second background throttle if the site is using websockets.  Was this intentional?
Flags: needinfo?(afarre)
(Assignee)

Comment 8

a year ago
Yep, that was intentional. We're aligning with the behaviour of Chrome here in that we always, with the exception of audio, allow the 1s throttling.
Flags: needinfo?(afarre)
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.