Crash under WebCore::EventTarget::fireEventListeners
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2018 21:06:34 +0000 (21:06 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Feb 2018 21:06:34 +0000 (21:06 +0000)
commit54756e59577407481ca5f3b3ca265ec3601cce6e
treeb80e056ae6b26bc17edd5f36265e102ced568114
parent9abeeec9b3a08b60009308451250089c584e0f11
Crash under WebCore::EventTarget::fireEventListeners
https://bugs.webkit.org/show_bug.cgi?id=182880
<rdar://problem/20788804>

Reviewed by Youenn Fablet.

Source/WebCore:

Make sure the 'ended' event does not get dispatched on a
AudioScheduledSourceNode after ActiveDOMObjects have been stopped.

Test: webaudio/audiobuffersource-ended-detached-frame.html

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::finish):

LayoutTests:

Add layout test coverage.

* webaudio/audiobuffersource-ended-detached-frame-expected.txt: Added.
* webaudio/audiobuffersource-ended-detached-frame.html: Added.
* webaudio/resources/audiobuffersource-ended-detached-frame-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webaudio/audiobuffersource-ended-detached-frame-expected.txt [new file with mode: 0644]
LayoutTests/webaudio/audiobuffersource-ended-detached-frame.html [new file with mode: 0644]
LayoutTests/webaudio/resources/audiobuffersource-ended-detached-frame-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp