This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changing <video> src during 'ended' event can leave screen sleep disa…
…bled https://bugs.webkit.org/show_bug.cgi?id=152018 Reviewed by Eric Carlson. Resetting a HTMLMediaElement's src during 'ended' introduces a race condition: whether the 'mediaPlayerRateChanged()' notification will fire before createMediaPlayer() destroys the old MediaPlayer firing said notification. To break the race condition, always update the sleep disabling assertion after destroying the media player (by creating a new one). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createMediaPlayer): Canonical link: https://commits.webkit.org/170177@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 2 changed files with 19 additions and 0 deletions.