Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r228574 - 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.
- Loading branch information
1 parent
733700e
commit f316363
Showing
6 changed files
with
104 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
LayoutTests/webaudio/audiobuffersource-ended-detached-frame-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Test that we do not crash when trying to fire an 'ended' event at a audiobuffersource node in a detached frame. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
24 changes: 24 additions & 0 deletions
24
LayoutTests/webaudio/audiobuffersource-ended-detached-frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<script src="../resources/js-test.js"></script> | ||
<script> | ||
function runTest() | ||
{ | ||
description("Test that we do not crash when trying to fire an 'ended' event at a audiobuffersource node in a detached frame."); | ||
jsTestIsAsync = true; | ||
|
||
frame = document.createElement("iframe"); | ||
frame.src = "resources/audiobuffersource-ended-detached-frame-iframe.html"; | ||
frame.onload = function() { | ||
frame.contentWindow.runTest(); | ||
frame.remove(); | ||
setTimeout(function() { | ||
finishJSTest(); | ||
}, 10); | ||
}; | ||
document.body.appendChild(frame); | ||
} | ||
</script> | ||
</head> | ||
<body onload="runTest()"> | ||
</body> |
26 changes: 26 additions & 0 deletions
26
LayoutTests/webaudio/resources/audiobuffersource-ended-detached-frame-iframe.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<script src="audio-testing.js"></script> | ||
<script src="audiobuffersource-testing.js"></script> | ||
<script> | ||
var context; | ||
var source; | ||
|
||
function runTest() | ||
{ | ||
var sampleRate = 44100.0; | ||
var numberOfFrames = 32; | ||
context = new webkitOfflineAudioContext(1, numberOfFrames, sampleRate); | ||
source = context.createBufferSource(); | ||
source.buffer = createTestBuffer(context, numberOfFrames); | ||
source.connect(context.destination); | ||
source.onended = function() | ||
{ | ||
} | ||
source.start(0); | ||
context.startRendering(); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters