WebKit Bugzilla
Attachment 370946 Details for
Bug 181597
: ASSERTION FAILED: m_scriptExecutionContext under WebCore::AudioContext::isPlayingAudioDidChange()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-181597-20190530090159.patch (text/plain), 4.14 KB, created by
Jer Noble
on 2019-05-30 09:02:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-05-30 09:02:00 PDT
Size:
4.14 KB
patch
obsolete
>Subversion Revision: 245884 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b88afa9f96a744755bd81bba4dc6a33b43d21d36..0306728bb16d023a648f055c71c3a40d1682bfcc 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2019-05-30 Jer Noble <jer.noble@apple.com> >+ >+ ASSERTION FAILED: m_scriptExecutionContext under WebCore::AudioContext::isPlayingAudioDidChange() >+ https://bugs.webkit.org/show_bug.cgi?id=181597 >+ <rdar://problem/36474088> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Because document() is usually null-checked before using (and we can add null-checks where missing), >+ there's no good reason to debug-assert that m_scriptExecutionContext is non-null before downcast<>ing >+ to Document*. >+ >+ * Modules/webaudio/AudioContext.cpp: >+ (WebCore::AudioContext::constructCommon): >+ (WebCore::AudioContext::stop): >+ (WebCore::AudioContext::document const): >+ (WebCore::AudioContext::visibilityStateChanged): >+ (WebCore::AudioContext::willBeginPlayback): >+ (WebCore::AudioContext::willPausePlayback): >+ (WebCore::AudioContext::pageMutedStateDidChange): >+ > 2019-05-30 Jer Noble <jer.noble@apple.com> > > Video playback in Safari should continue when CarPlay is plugged in >diff --git a/Source/WebCore/Modules/webaudio/AudioContext.cpp b/Source/WebCore/Modules/webaudio/AudioContext.cpp >index 6aabd2b166e523703c2190c30cb8daa8f66098e7..424683e0194ba830b4be33a20311f314d90dd74c 100644 >--- a/Source/WebCore/Modules/webaudio/AudioContext.cpp >+++ b/Source/WebCore/Modules/webaudio/AudioContext.cpp >@@ -107,7 +107,7 @@ namespace WebCore { > > WTF_MAKE_ISO_ALLOCATED_IMPL(AudioContext); > >-#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(document()->page() && document()->page()->isAlwaysOnLoggingAllowed(), Media, "%p - AudioContext::" fmt, this, ##__VA_ARGS__) >+#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(document() && document()->page() && document()->page()->isAlwaysOnLoggingAllowed(), Media, "%p - AudioContext::" fmt, this, ##__VA_ARGS__) > > bool AudioContext::isSampleRateRangeGood(float sampleRate) > { >@@ -180,6 +180,7 @@ void AudioContext::constructCommon() > > m_listener = AudioListener::create(); > >+ ASSERT(document()); > if (document()->audioPlaybackRequiresUserGesture()) > addBehaviorRestriction(RequireUserGestureForAudioStartRestriction); > else >@@ -329,6 +330,7 @@ void AudioContext::stop() > return; > m_isStopScheduled = true; > >+ ASSERT(document()); > document()->updateIsPlayingMedia(); > > m_eventQueue->close(); >@@ -350,7 +352,6 @@ const char* AudioContext::activeDOMObjectName() const > > Document* AudioContext::document() const > { >- ASSERT(m_scriptExecutionContext); > return downcast<Document>(m_scriptExecutionContext); > } > >@@ -382,7 +383,7 @@ bool AudioContext::isSuspended() const > void AudioContext::visibilityStateChanged() > { > // Do not suspend if audio is audible. >- if (mediaState() == MediaProducer::IsPlayingAudio || m_isStopScheduled) >+ if (!document() || mediaState() == MediaProducer::IsPlayingAudio || m_isStopScheduled) > return; > > if (document()->hidden()) { >@@ -1083,6 +1084,9 @@ void AudioContext::nodeWillBeginPlayback() > > bool AudioContext::willBeginPlayback() > { >+ if (!document()) >+ return false; >+ > if (userGestureRequiredForAudioStart()) { > if (!processingUserGestureForMedia() && !document()->isCapturing()) { > ALWAYS_LOG(LOGIDENTIFIER, "returning false, not processing user gesture or capturing"); >@@ -1109,6 +1113,9 @@ bool AudioContext::willBeginPlayback() > > bool AudioContext::willPausePlayback() > { >+ if (!document()) >+ return false; >+ > if (userGestureRequiredForAudioStart()) { > if (!processingUserGestureForMedia()) > return false; >@@ -1154,7 +1161,7 @@ MediaProducer::MediaStateFlags AudioContext::mediaState() const > > void AudioContext::pageMutedStateDidChange() > { >- if (m_destinationNode && document()->page()) >+ if (m_destinationNode && document() && document()->page()) > m_destinationNode->setMuted(document()->page()->isAudioMuted()); > } >
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 181597
:
331211
|
336552
|
337007
|
337283
|
337370
|
337378
|
337387
| 370946