Changeset 244860 in webkit
- Timestamp:
- May 1, 2019 5:20:38 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244856 r244860 1 2019-05-01 Youenn Fablet <youenn@apple.com> 2 3 Add back hasNullReferences() assert in Document::updateIsPlayingMedia 4 https://bugs.webkit.org/show_bug.cgi?id=197477 5 6 Reviewed by Eric Carlson. 7 8 AudioContext had a special scriptExecutionContext() getter 9 that was returning nullptr when AudioContext is stopped. 10 Instead, make this getter behave as all other scriptExecutionContext() getters 11 and make sure existing call sites of the getter are fine with the change. 12 13 Covered by existing tests. 14 15 * Modules/webaudio/AudioContext.cpp: 16 (WebCore::AudioContext::AudioContext): 17 No need to check whether offline since this constructor is for non offline AudioContext. 18 (WebCore::AudioContext::scriptExecutionContext const): 19 (WebCore::AudioContext::fireCompletionEvent): 20 * dom/Document.cpp: 21 (WebCore::Document::updateIsPlayingMedia): 22 1 23 2019-05-01 Justin Fan <justin_fan@apple.com> 2 24 -
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp
r244825 r244860 149 149 pageMutedStateDidChange(); 150 150 151 if (!isOfflineContext()) { 152 document.addAudioProducer(*this); 153 document.registerForVisibilityStateChangedCallbacks(*this); 154 } 151 document.addAudioProducer(*this); 152 document.registerForVisibilityStateChangedCallbacks(*this); 155 153 } 156 154 … … 1068 1066 ScriptExecutionContext* AudioContext::scriptExecutionContext() const 1069 1067 { 1070 return m_isStopScheduled ? 0 :ActiveDOMObject::scriptExecutionContext();1068 return ActiveDOMObject::scriptExecutionContext(); 1071 1069 } 1072 1070 … … 1187 1185 1188 1186 // Avoid firing the event if the document has already gone away. 1189 if ( scriptExecutionContext()) {1187 if (!m_isStopScheduled) { 1190 1188 // Call the offline rendering completion event listener. 1191 1189 m_eventQueue->enqueueEvent(OfflineAudioCompletionEvent::create(renderedBuffer)); -
trunk/Source/WebCore/dom/Document.cpp
r244853 r244860 3926 3926 void Document::updateIsPlayingMedia(uint64_t sourceElementID) 3927 3927 { 3928 ASSERT(!m_audioProducers.hasNullReferences()); 3928 3929 MediaProducer::MediaStateFlags state = MediaProducer::IsNotPlaying; 3929 3930 for (auto& audioProducer : m_audioProducers)
Note: See TracChangeset
for help on using the changeset viewer.