Improve MediaManager::mPendingGUMRequest logic
Categories
(Core :: WebRTC: Audio/Video, defect, P3)
Tracking
()
People
(Reporter: karlt, Assigned: pehrsons)
References
(Blocks 3 open bugs, Regression)
Details
(Keywords: regression)
Attachments
(10 files, 1 obsolete file)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
mPendingGUMRequest was implemented as an incomplete band-aid, with multiple flaws including the following.
The check on whether to send a new request is based on whether there is an existing request for the relevant (inner) window, but pending requests are dispatched when a request in the same process (for a potentially different window) is completed.
Some error handling paths trigger SendPendingGUMRequest():
but others do not:
The queue blocks even requests that do not need a prompt.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
This is an attempt to make it clearer what an active window is. The term still
lives on through IsWindowStillActive and IsWindowListenerStillActive but it is
hopefully clearer that they only check whether a window listener is registered
to a window (id).
This hopefully reduces confusion with other terms, such as "active callbacks".
| Assignee | ||
Comment 2•3 years ago
|
||
| Assignee | ||
Comment 3•3 years ago
|
||
At least a local failure has been observed in
browser_devices_get_user_media_in_xorigin_frame.js.
| Assignee | ||
Comment 4•3 years ago
|
||
| Assignee | ||
Comment 5•3 years ago
|
||
| Assignee | ||
Comment 6•3 years ago
|
||
This patch mainly moves window and call/request related data structures from
MediaManager into a new helper class called MediaManagerData. A lot of the
logic around these data structures moves along into MediaManagerData.
MediaManagerData stores the data in a natural way that better matches the
hierarchical relationships between calls, windows and MediaManager. This
improves readability of the affected code significantly, and makes it easier
to improve this code in the future.
It also takes over the responsibility to send some notifications to the
frontend, to declutter the code in MediaManager.
| Assignee | ||
Comment 7•3 years ago
|
||
It is already baked into askPermission and therefore has no effect.
| Assignee | ||
Comment 8•3 years ago
|
||
This patch removes the race by which MediaManager would check the registered
GetUserMediaTasks to determine whether to show a prompt, but pop the request
queue (thereby showing another prompt) at a later time than when unregistering
a GetUserMediaTask. This allowed another request to come in and show a prompt
in between these events, so that when popping the request queue there'd be two
simultaneous requests sent to the parent for prompting.
With this patch MediaManagerData is in charge of sending requests, and it will
only check the request queue when determining whether a request should be sent.
| Assignee | ||
Comment 9•3 years ago
|
||
| Assignee | ||
Comment 10•3 years ago
|
||
| Assignee | ||
Comment 11•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•1 year ago
|
Description
•