Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 587683002: Ensure that hasPendingActivity() is false for stopped media elements (Closed)

Created:
6 years, 3 months ago by philipj_slow
Modified:
6 years, 3 months ago
Reviewers:
fs
CC:
blink-reviews, blink-reviews-html_chromium.org, gasubic, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, nessy, vcarbune.chromium
Project:
blink
Visibility:
Public.

Description

Ensure that hasPendingActivity() is false for stopped media elements Where stopped means that ActiveDOMObject::stop() has been called. All the conditions in hasPendingActivity() are now false after stop(): - m_shouldDelayLoadEvent is set to false by userCancelledLoad() -> setShouldDelayLoadEvent(false). - m_networkState is either NETWORK_EMPTY or NETWORK_IDLE after userCancelledLoad(). - couldPlayEnoughData() returns false because m_paused is now set to true by stop(). - m_seeking is now set to false by stop(). - m_mediaSource is set to null by userCancelledLoad() -> closeMediaSource(). - m_asyncEventQueue->hasPendingEvents() is false because stop() calls m_asyncEventQueue->close(). TEST=LayoutTests/media/gc-pending-event-inactive-document.html This test reliably hits the assert that revealed this problem: https://codereview.chromium.org/584633004 BUG=400659 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182332

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -4 lines) Patch
A LayoutTests/media/gc-pending-event-inactive-document.html View 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
philipj_slow
PTAL. Instead of https://codereview.chromium.org/585903002/
6 years, 3 months ago (2014-09-19 13:45:39 UTC) #2
fs
LGTM Description nit: "couldPlayEnoughData() returns false because m_paused is now set to false by stop()." ...
6 years, 3 months ago (2014-09-19 13:50:00 UTC) #3
philipj_slow
On 2014/09/19 13:50:00, fs wrote: > LGTM > > Description nit: > > "couldPlayEnoughData() returns ...
6 years, 3 months ago (2014-09-19 13:53:20 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/587683002/1
6 years, 3 months ago (2014-09-19 13:56:08 UTC) #6
commit-bot: I haz the power
6 years, 3 months ago (2014-09-19 15:04:52 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as 182332

Powered by Google App Engine
This is Rietveld 408576698