Stop listening for "media can start" notifications when media player is cleared
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2016 19:37:17 +0000 (19:37 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2016 19:37:17 +0000 (19:37 +0000)
commitf09e4733097f83d6411d3b0a01ddec16993b4447
tree54c48fd32e706d8f7d1660b9782facd4610f238b
parente1671a162c2a01c176fcc373399bb524fe8aa450
Stop listening for "media can start" notifications when media player is cleared
https://bugs.webkit.org/show_bug.cgi?id=156985
<rdar://problem/23158505>

Reviewed by Jer Noble.

No new tests, I have not been able to create a test that reliably reproduces this.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadInternal): Add logging.
(WebCore::HTMLMediaElement::selectMediaResource): Assert and return early if there is
  no media player.
(WebCore::HTMLMediaElement::clearMediaPlayer): Stop listening for can start notifications.
(WebCore::HTMLMediaElement::visibilityStateChanged): Add logging.
(WebCore::HTMLMediaElement::mediaCanStart): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp