https://bugs.webkit.org/show_bug.cgi?id=147085
Reviewed by Eric Carlson.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::isPlayingAudioDidChange):
Null-check document() before dereferencing it in case the audio context's document is destroyed
by the time the code block is called on the main thread.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187098
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-07-20 Ada Chan <adachan@apple.com>
+
+ Follow-up to my earlier fix for r147085
+ https://bugs.webkit.org/show_bug.cgi?id=147085
+
+ Reviewed by Eric Carlson.
+
+ * Modules/webaudio/AudioContext.cpp:
+ (WebCore::AudioContext::isPlayingAudioDidChange):
+ Null-check document() before dereferencing it in case the audio context's document is destroyed
+ by the time the code block is called on the main thread.
+
2015-07-20 Carlos Garcia Campos <cgarcia@igalia.com>
Remove RenderTheme::shouldShowPlaceholderWhenFocused()
// we could be on the audio I/O thread here and the call into WebCore could block.
RefPtr<AudioContext> strongThis(this);
callOnMainThread([strongThis] {
- strongThis->document()->updateIsPlayingMedia();
+ if (strongThis->document())
+ strongThis->document()->updateIsPlayingMedia();
});
}