Nullptr crash accessing Document in GenericEventQueue::dispatchOneEvent()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jul 2018 18:17:12 +0000 (18:17 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jul 2018 18:17:12 +0000 (18:17 +0000)
commit51250df4ed355db527eac7fe54c4b546eede901e
tree4a7958d1230ae3e4a7b44868c70b27095a2b5c37
parentad47d62e037e394e44e5e484ddf6deb4f2f6a6ae
Nullptr crash accessing Document in GenericEventQueue::dispatchOneEvent()
https://bugs.webkit.org/show_bug.cgi?id=187284

Unreviewed, roll r233496 and r233571 now that all known issues have been fixed via
dependency bugs.

Source/WebCore:

Test: media/track/video-track-addition-and-frame-removal.html

* Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
(WebCore::WebKitMediaKeySession::suspend):
(WebCore::WebKitMediaKeySession::resume):
(WebCore::WebKitMediaKeySession::stop):
* Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::removeSourceBuffer):
(WebCore::MediaSource::suspend):
(WebCore::MediaSource::resume):
* Modules/mediasource/MediaSource.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::suspend):
(WebCore::SourceBuffer::resume):
(WebCore::SourceBuffer::stop):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/SourceBufferList.cpp:
(WebCore::SourceBufferList::SourceBufferList):
(WebCore::SourceBufferList::canSuspendForDocumentSuspension const):
(WebCore::SourceBufferList::suspend):
(WebCore::SourceBufferList::resume):
(WebCore::SourceBufferList::stop):
(WebCore::SourceBufferList::activeDOMObjectName const):
* Modules/mediasource/SourceBufferList.h:
* Modules/mediasource/SourceBufferList.idl:
* dom/Document.h:
(WebCore::Document::hasBrowsingContext const):
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::dispatchOneEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::prepareToPlay):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::sourceWasAdded):
* html/track/AudioTrackList.cpp:
(AudioTrackList::activeDOMObjectName const):
* html/track/AudioTrackList.h:
* html/track/AudioTrackList.idl:
* html/track/TextTrackList.cpp:
(TextTrackList::activeDOMObjectName const):
* html/track/TextTrackList.h:
* html/track/TextTrackList.idl:
* html/track/TrackListBase.cpp:
(WebCore::TrackListBase::TrackListBase):
(WebCore::TrackListBase::canSuspendForDocumentSuspension const):
(WebCore::TrackListBase::suspend):
(WebCore::TrackListBase::resume):
(WebCore::TrackListBase::stop):
* html/track/TrackListBase.h:
* html/track/VideoTrackList.cpp:
(VideoTrackList::activeDOMObjectName const):
* html/track/VideoTrackList.h:
* html/track/VideoTrackList.idl:

LayoutTests:

* media/track/video-track-addition-and-frame-removal-expected.txt: Added.
* media/track/video-track-addition-and-frame-removal.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/media/track/video-track-addition-and-frame-removal-expected.txt [new file with mode: 0644]
LayoutTests/media/track/video-track-addition-and-frame-removal.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeySession.h
Source/WebCore/Modules/mediasource/MediaSource.cpp
Source/WebCore/Modules/mediasource/MediaSource.h
Source/WebCore/Modules/mediasource/SourceBuffer.cpp
Source/WebCore/Modules/mediasource/SourceBuffer.h
Source/WebCore/Modules/mediasource/SourceBufferList.cpp
Source/WebCore/Modules/mediasource/SourceBufferList.h
Source/WebCore/Modules/mediasource/SourceBufferList.idl
Source/WebCore/dom/Document.h
Source/WebCore/dom/GenericEventQueue.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/track/AudioTrackList.cpp
Source/WebCore/html/track/AudioTrackList.h
Source/WebCore/html/track/AudioTrackList.idl
Source/WebCore/html/track/TextTrackList.cpp
Source/WebCore/html/track/TextTrackList.h
Source/WebCore/html/track/TextTrackList.idl
Source/WebCore/html/track/TrackListBase.cpp
Source/WebCore/html/track/TrackListBase.h
Source/WebCore/html/track/VideoTrackList.cpp
Source/WebCore/html/track/VideoTrackList.h
Source/WebCore/html/track/VideoTrackList.idl