Changeset 185120 in webkit
- Timestamp:
- Jun 2, 2015, 2:04:55 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLMediaElement.cpp (modified) (4 diffs)
-
html/MediaElementSession.cpp (modified) (1 diff)
-
html/MediaElementSession.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r185118 r185120 1 2015-06-02 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange 4 https://bugs.webkit.org/show_bug.cgi?id=145559 5 6 Reviewed by Darin Adler. 7 8 No new tests, covered by existing tests. 9 10 * html/HTMLMediaElement.cpp: 11 (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument. 12 (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument. 13 (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto. 14 (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto. 15 16 * html/MediaElementSession.cpp: 17 (WebCore::MediaElementSession::registerWithDocument): Take a document. 18 (WebCore::MediaElementSession::unregisterWithDocument): Ditto. 19 * html/MediaElementSession.h: 20 1 21 2015-06-02 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r185006 r185120 461 461 void HTMLMediaElement::registerWithDocument(Document& document) 462 462 { 463 m_mediaSession->registerWithDocument( *this);463 m_mediaSession->registerWithDocument(document); 464 464 465 465 if (m_isWaitingUntilMediaCanStart) … … 493 493 void HTMLMediaElement::unregisterWithDocument(Document& document) 494 494 { 495 m_mediaSession->unregisterWithDocument( *this);495 m_mediaSession->unregisterWithDocument(document); 496 496 497 497 if (m_isWaitingUntilMediaCanStart) … … 531 531 } 532 532 533 if (oldDocument) {533 if (oldDocument) 534 534 unregisterWithDocument(*oldDocument); 535 }536 535 537 536 registerWithDocument(document()); … … 543 542 void HTMLMediaElement::documentWillSuspendForPageCache() 544 543 { 545 m_mediaSession->unregisterWithDocument( *this);544 m_mediaSession->unregisterWithDocument(document()); 546 545 } 547 546 548 547 void HTMLMediaElement::documentDidResumeFromPageCache() 549 548 { 550 m_mediaSession->registerWithDocument( *this);549 m_mediaSession->registerWithDocument(document()); 551 550 } 552 551 #endif -
trunk/Source/WebCore/html/MediaElementSession.cpp
r185006 r185120 88 88 } 89 89 90 void MediaElementSession::registerWithDocument( const HTMLMediaElement& element)91 { 92 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 93 element.document().addPlaybackTargetPickerClient(*this);90 void MediaElementSession::registerWithDocument(Document& document) 91 { 92 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 93 document.addPlaybackTargetPickerClient(*this); 94 94 #else 95 UNUSED_PARAM( element);96 #endif 97 } 98 99 void MediaElementSession::unregisterWithDocument( const HTMLMediaElement& element)100 { 101 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 102 element.document().removePlaybackTargetPickerClient(*this);95 UNUSED_PARAM(document); 96 #endif 97 } 98 99 void MediaElementSession::unregisterWithDocument(Document& document) 100 { 101 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 102 document.removePlaybackTargetPickerClient(*this); 103 103 #else 104 UNUSED_PARAM( element);104 UNUSED_PARAM(document); 105 105 #endif 106 106 } -
trunk/Source/WebCore/html/MediaElementSession.h
r185006 r185120 45 45 virtual ~MediaElementSession() { } 46 46 47 void registerWithDocument( const HTMLMediaElement&);48 void unregisterWithDocument( const HTMLMediaElement&);47 void registerWithDocument(Document&); 48 void unregisterWithDocument(Document&); 49 49 50 50 bool playbackPermitted(const HTMLMediaElement&) const;
Note:
See TracChangeset
for help on using the changeset viewer.