Changeset 200833 in webkit
- Timestamp:
- May 13, 2016, 3:39:45 AM (9 years ago)
- Location:
- releases/WebKitGTK/webkit-2.12/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog
r200832 r200833 1 2016-04-25 Eric Carlson <eric.carlson@apple.com> 2 3 Stop listening for "media can start" notifications when media player is cleared 4 https://bugs.webkit.org/show_bug.cgi?id=156985 5 <rdar://problem/23158505> 6 7 Reviewed by Jer Noble. 8 9 No new tests, I have not been able to create a test that reliably reproduces this. 10 11 * html/HTMLMediaElement.cpp: 12 (WebCore::HTMLMediaElement::loadInternal): Add logging. 13 (WebCore::HTMLMediaElement::selectMediaResource): Assert and return early if there is 14 no media player. 15 (WebCore::HTMLMediaElement::clearMediaPlayer): Stop listening for can start notifications. 16 (WebCore::HTMLMediaElement::visibilityStateChanged): Add logging. 17 (WebCore::HTMLMediaElement::mediaCanStart): Ditto. 18 1 19 2016-04-25 Daniel Bates <dabates@apple.com> 2 20 -
releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLMediaElement.cpp
r199461 r200833 1124 1124 void HTMLMediaElement::loadInternal() 1125 1125 { 1126 LOG(Media, "HTMLMediaElement::loadInternal(%p)", this); 1127 1126 1128 // Some of the code paths below this function dispatch the BeforeLoad event. This ASSERT helps 1127 1129 // us catch those bugs more quickly without needing all the branches to align to actually … … 1131 1133 // If we can't start a load right away, start it later. 1132 1134 if (!m_mediaSession->pageAllowsDataLoading(*this)) { 1135 LOG(Media, "HTMLMediaElement::loadInternal(%p) - not allowed to load in background, waiting", this); 1133 1136 setShouldDelayLoadEvent(false); 1134 1137 if (m_isWaitingUntilMediaCanStart) 1135 1138 return; 1139 m_isWaitingUntilMediaCanStart = true; 1136 1140 document().addMediaCanStartListener(this); 1137 m_isWaitingUntilMediaCanStart = true;1138 1141 return; 1139 1142 } … … 1170 1173 { 1171 1174 LOG(Media, "HTMLMediaElement::selectMediaResource(%p)", this); 1175 1176 ASSERT(m_player); 1177 if (!m_player) 1178 return; 1172 1179 1173 1180 enum Mode { attribute, children }; … … 4981 4988 #endif 4982 4989 4990 if (m_isWaitingUntilMediaCanStart) { 4991 m_isWaitingUntilMediaCanStart = false; 4992 document().removeMediaCanStartListener(this); 4993 } 4994 4983 4995 m_player = nullptr; 4984 4996 … … 5120 5132 void HTMLMediaElement::visibilityStateChanged() 5121 5133 { 5122 LOG(Media, "HTMLMediaElement::visibilityStateChanged(%p)", this);5123 5134 m_elementIsHidden = document().hidden(); 5135 LOG(Media, "HTMLMediaElement::visibilityStateChanged(%p) - visible = %s", this, boolString(!m_elementIsHidden)); 5124 5136 updateSleepDisabling(); 5125 5137 m_mediaSession->visibilityChanged(); … … 5517 5529 void HTMLMediaElement::mediaCanStart() 5518 5530 { 5519 LOG(Media, "HTMLMediaElement::mediaCanStart(%p)", this); 5531 LOG(Media, "HTMLMediaElement::mediaCanStart(%p) - m_isWaitingUntilMediaCanStart = %s, m_pausedInternal = %s", 5532 this, boolString(m_isWaitingUntilMediaCanStart), boolString(m_pausedInternal) ); 5520 5533 5521 5534 ASSERT(m_isWaitingUntilMediaCanStart || m_pausedInternal);
Note:
See TracChangeset
for help on using the changeset viewer.