Closed
Bug 1415461
Opened 7 years ago
Closed 7 years ago
Consolidate the life cycle of the channel managed by ChannelSuspendAgent
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(1 file)
http://searchfox.org/mozilla-central/rev/ed212c79cfe86357e9a5740082b9364e7f6e526f/dom/media/ChannelMediaResource.cpp#1042,1056 We should suspend/resume the channel after OnStartRequest() and before OnStopRequest() is fired. It doesn't make sense to suspend/resume a channel after it is closed. Likewise, it doesn't make much sense either to suspend/resume a channel before OnStartRequest() is received.
Assignee | ||
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8927118 -
Flags: review?(bechen)
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8927118 [details] Bug 1415461 - consolidate the life cycle of the channel managed by ChannelSuspendAgent. https://reviewboard.mozilla.org/r/198340/#review203582 So this patch actually change the behavior of "suspend comes before OnStartRequest". Do we have testcases? Or should we add some assert?
Attachment #8927118 -
Flags: review?(bechen) → review+
Assignee | ||
Comment 3•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8927118 [details] Bug 1415461 - consolidate the life cycle of the channel managed by ChannelSuspendAgent. https://reviewboard.mozilla.org/r/198340/#review203582 No, it is just a case we want to avoid as stated in comment 0. Consider the following case: suspend -> OnChannelRedirect -> OnStartRequest Without this change, we would suspend the old channel without resuming it again.
Assignee | ||
Updated•7 years ago
|
Attachment #8927118 -
Flags: review?(gsquelart)
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8927118 [details] Bug 1415461 - consolidate the life cycle of the channel managed by ChannelSuspendAgent. https://reviewboard.mozilla.org/r/198340/#review203646 ::: dom/media/ChannelMediaResource.cpp:1076 (Diff revision 1) > - if (!mIsChannelSuspended && IsSuspended()) { > + MOZ_ASSERT(aChannel); > + MOZ_ASSERT(!mChannel, "The previous channel not closed."); > + MOZ_ASSERT(!mIsChannelSuspended); > + > + mChannel = aChannel; > + // Ensure the suspend status of the channel match our suspend count. 'match' -> 'matches' ::: dom/media/ChannelMediaResource.cpp:1092 (Diff revision 1) > -void > -ChannelSuspendAgent::NotifyChannelClosing() > -{ > - MOZ_ASSERT(NS_IsMainThread()); > - MOZ_ASSERT(mChannel); > // Before close the channel, it need to be resumed to make sure its internal Since you're modifying nearby code: 'close' -> 'closing', 'need' -> 'needs'
Attachment #8927118 -
Flags: review?(gsquelart) → review+
Assignee | ||
Comment 5•7 years ago
|
||
Thanks for the reviews!
Comment hidden (mozreview-request) |
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/056e41a8b982 consolidate the life cycle of the channel managed by ChannelSuspendAgent. r=bechen,gerald
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/056e41a8b982
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•