зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e3b626560b0d (bug 1161025) for causing crashtest failures on 966636.html.
CLOSED TREE
This commit is contained in:
Родитель
a5b9f2b330
Коммит
ca111b6d55
|
@ -584,8 +584,7 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* aContext)
|
|||
mLoopEnd(0.0),
|
||||
// mOffset and mDuration are initialized in Start().
|
||||
mLoop(false),
|
||||
mStartCalled(false),
|
||||
mBufferSet(false) {
|
||||
mStartCalled(false) {
|
||||
CreateAudioParam(mPlaybackRate, PLAYBACKRATE, "playbackRate", 1.0f);
|
||||
CreateAudioParam(mDetune, DETUNE, "detune", 0.0f);
|
||||
AudioBufferSourceNodeEngine* engine =
|
||||
|
@ -605,9 +604,8 @@ already_AddRefed<AudioBufferSourceNode> AudioBufferSourceNode::Create(
|
|||
new AudioBufferSourceNode(&aAudioContext);
|
||||
|
||||
if (aOptions.mBuffer.WasPassed()) {
|
||||
ErrorResult ignored;
|
||||
MOZ_ASSERT(aCx);
|
||||
audioNode->SetBuffer(aCx, aOptions.mBuffer.Value(), ignored);
|
||||
audioNode->SetBuffer(aCx, aOptions.mBuffer.Value());
|
||||
}
|
||||
|
||||
audioNode->Detune()->SetValue(aOptions.mDetune);
|
||||
|
|
|
@ -47,16 +47,7 @@ class AudioBufferSourceNode final : public AudioScheduledSourceNode,
|
|||
void Stop(double aWhen, ErrorResult& aRv) override;
|
||||
|
||||
AudioBuffer* GetBuffer(JSContext* aCx) const { return mBuffer; }
|
||||
void SetBuffer(JSContext* aCx, AudioBuffer* aBuffer, ErrorResult& aRv) {
|
||||
if (aBuffer && mBufferSet) {
|
||||
aRv.ThrowDOMException(NS_ERROR_DOM_INVALID_STATE_ERR,
|
||||
"Cannot set the buffer attribute of an AudioBufferSourceNode "
|
||||
"with an AudioBuffer more than once");
|
||||
return;
|
||||
}
|
||||
if (aBuffer) {
|
||||
mBufferSet = true;
|
||||
}
|
||||
void SetBuffer(JSContext* aCx, AudioBuffer* aBuffer) {
|
||||
mBuffer = aBuffer;
|
||||
SendBufferParameterToTrack(aCx);
|
||||
SendLoopParametersToTrack();
|
||||
|
@ -124,7 +115,6 @@ class AudioBufferSourceNode final : public AudioScheduledSourceNode,
|
|||
RefPtr<AudioParam> mDetune;
|
||||
bool mLoop;
|
||||
bool mStartCalled;
|
||||
bool mBufferSet;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -89,6 +89,7 @@ skip-if = (os == "win" && processor == "aarch64") # aarch64 due to 1539522
|
|||
[test_bug866570.html]
|
||||
[test_bug866737.html]
|
||||
[test_bug867089.html]
|
||||
[test_bug867104.html]
|
||||
[test_bug867174.html]
|
||||
[test_bug875221.html]
|
||||
[test_bug875402.html]
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Crashtest for bug 867104</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function() {
|
||||
var ctx = new AudioContext();
|
||||
var source = ctx.createBufferSource();
|
||||
var b0 = ctx.createBuffer(32,798,22050);
|
||||
var b1 = ctx.createBuffer(32,28,22050);
|
||||
var sp = ctx.createScriptProcessor(0, 2, 0);
|
||||
source.buffer = b0;
|
||||
source.connect(sp);
|
||||
source.start(0);
|
||||
source.buffer = b1;
|
||||
sp.onaudioprocess = function() {
|
||||
ok(true, "We did not crash.");
|
||||
sp.onaudioprocess = null;
|
||||
SimpleTest.finish();
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -25,7 +25,6 @@ interface AudioBufferSourceNode : AudioScheduledSourceNode {
|
|||
constructor(BaseAudioContext context,
|
||||
optional AudioBufferSourceOptions options = {});
|
||||
|
||||
[SetterThrows]
|
||||
attribute AudioBuffer? buffer;
|
||||
|
||||
readonly attribute AudioParam playbackRate;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
[audiobuffersource-channels.html]
|
||||
[X source.buffer = new buffer did not throw an exception.]
|
||||
expected: FAIL
|
||||
|
||||
[X source.buffer = buffer again did not throw an exception.]
|
||||
expected: FAIL
|
||||
|
||||
[< [validate .buffer\] 2 out of 16 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
Загрузка…
Ссылка в новой задаче