WebKit Bugzilla
Attachment 368727 Details for
Bug 197477
: Add back hasNullReferences() assert in Document::updateIsPlayingMedia
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197477-20190501160807.patch (text/plain), 3.46 KB, created by
youenn fablet
on 2019-05-01 16:08:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-05-01 16:08:07 PDT
Size:
3.46 KB
patch
obsolete
>Subversion Revision: 244802 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1907b39bd21eda6be7b506e70409fa03d8e30772..7a61a2ef06ea1d4c353230c9d3f9d9e9b43695a7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2019-05-01 Youenn Fablet <youenn@apple.com> >+ >+ Add back hasNullReferences() assert in Document::updateIsPlayingMedia >+ https://bugs.webkit.org/show_bug.cgi?id=197477 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ AudioContext had a special scriptExecutionContext() getter >+ that was returning nullptr when AudioContext is stopped. >+ Instead, make this getter behave as all other scriptExecutionContext() getters >+ and make sure existing call sites of the getter are fine with the change. >+ >+ Covered by existing tests. >+ >+ * Modules/webaudio/AudioContext.cpp: >+ (WebCore::AudioContext::AudioContext): >+ No need to check whether offline since this constructor is for non offline AudioContext. >+ (WebCore::AudioContext::scriptExecutionContext const): >+ (WebCore::AudioContext::fireCompletionEvent): >+ * dom/Document.cpp: >+ (WebCore::Document::updateIsPlayingMedia): >+ > 2019-05-01 Youenn Fablet <youenn@apple.com> > > Cache.add and Cache.addAll should compute a correct response body size >diff --git a/Source/WebCore/Modules/webaudio/AudioContext.cpp b/Source/WebCore/Modules/webaudio/AudioContext.cpp >index 74fc85909744954a8c185bce0c280e1a99bbd257..ed8ae491cc8cfc5e103d9feab9fd95f91c7b38b7 100644 >--- a/Source/WebCore/Modules/webaudio/AudioContext.cpp >+++ b/Source/WebCore/Modules/webaudio/AudioContext.cpp >@@ -148,10 +148,8 @@ AudioContext::AudioContext(Document& document) > // Initialize the destination node's muted state to match the page's current muted state. > pageMutedStateDidChange(); > >- if (!isOfflineContext()) { >- document.addAudioProducer(*this); >- document.registerForVisibilityStateChangedCallbacks(*this); >- } >+ document.addAudioProducer(*this); >+ document.registerForVisibilityStateChangedCallbacks(*this); > } > > // Constructor for offline (non-realtime) rendering. >@@ -1067,7 +1065,7 @@ void AudioContext::processAutomaticPullNodes(size_t framesToProcess) > > ScriptExecutionContext* AudioContext::scriptExecutionContext() const > { >- return m_isStopScheduled ? 0 : ActiveDOMObject::scriptExecutionContext(); >+ return ActiveDOMObject::scriptExecutionContext(); > } > > void AudioContext::nodeWillBeginPlayback() >@@ -1186,7 +1184,7 @@ void AudioContext::fireCompletionEvent() > return; > > // Avoid firing the event if the document has already gone away. >- if (scriptExecutionContext()) { >+ if (!m_isStopScheduled) { > // Call the offline rendering completion event listener. > m_eventQueue->enqueueEvent(OfflineAudioCompletionEvent::create(renderedBuffer)); > } >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 24b7018d91762f66b9ca294b64bfcc845cde5463..de79dc4f27cc5febfa3e73887c2e6747804e034a 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -3926,6 +3926,7 @@ void Document::noteUserInteractionWithMediaElement() > > void Document::updateIsPlayingMedia(uint64_t sourceElementID) > { >+ ASSERT(!m_audioProducers.hasNullReferences()); > MediaProducer::MediaStateFlags state = MediaProducer::IsNotPlaying; > for (auto& audioProducer : m_audioProducers) > state |= audioProducer.mediaState();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197477
: 368727