Modified: trunk/LayoutTests/ChangeLog (244796 => 244797)
--- trunk/LayoutTests/ChangeLog 2019-04-30 20:08:01 UTC (rev 244796)
+++ trunk/LayoutTests/ChangeLog 2019-04-30 20:09:44 UTC (rev 244797)
@@ -1,3 +1,18 @@
+2019-04-30 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r244774.
+ https://bugs.webkit.org/show_bug.cgi?id=197431
+
+ Causing assertion failures on debug queues (Requested by
+ ShawnRoberts on #webkit).
+
+ Reverted changeset:
+
+ "Reject/throw when calling AudioContext methods on a stopped
+ AudioContext"
+ https://bugs.webkit.org/show_bug.cgi?id=197391
+ https://trac.webkit.org/changeset/244774
+
2019-04-30 Alex Christensen <[email protected]>
Add WKContentRuleList ping resource-type
Modified: trunk/LayoutTests/platform/win/TestExpectations (244796 => 244797)
--- trunk/LayoutTests/platform/win/TestExpectations 2019-04-30 20:08:01 UTC (rev 244796)
+++ trunk/LayoutTests/platform/win/TestExpectations 2019-04-30 20:09:44 UTC (rev 244797)
@@ -494,7 +494,6 @@
# TODO For now, Web Audio tests are disabled
webkit.org/b/86914 webaudio/ [ Skip ]
-webkit.org/b/86914 http/wpt/webaudio/ [ Skip ]
webkit.org/b/86914 fast/history/page-cache-closed-audiocontext.html [ Skip ]
webkit.org/b/86914 fast/history/page-cache-running-audiocontext.html [ Skip ]
webkit.org/b/86914 fast/history/page-cache-suspended-audiocontext.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (244796 => 244797)
--- trunk/Source/WebCore/ChangeLog 2019-04-30 20:08:01 UTC (rev 244796)
+++ trunk/Source/WebCore/ChangeLog 2019-04-30 20:09:44 UTC (rev 244797)
@@ -1,3 +1,18 @@
+2019-04-30 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r244774.
+ https://bugs.webkit.org/show_bug.cgi?id=197431
+
+ Causing assertion failures on debug queues (Requested by
+ ShawnRoberts on #webkit).
+
+ Reverted changeset:
+
+ "Reject/throw when calling AudioContext methods on a stopped
+ AudioContext"
+ https://bugs.webkit.org/show_bug.cgi?id=197391
+ https://trac.webkit.org/changeset/244774
+
2019-04-30 Alex Christensen <[email protected]>
Add WKContentRuleList ping resource-type
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (244796 => 244797)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2019-04-30 20:08:01 UTC (rev 244796)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp 2019-04-30 20:09:44 UTC (rev 244797)
@@ -216,8 +216,6 @@
void AudioContext::lazyInitialize()
{
- ASSERT(!m_isStopScheduled);
-
if (m_isInitialized)
return;
@@ -432,15 +430,11 @@
m_audioDecoder.decodeAsync(WTFMove(audioData), sampleRate(), WTFMove(successCallback), WTFMove(errorCallback));
}
-ExceptionOr<Ref<AudioBufferSourceNode>> AudioContext::createBufferSource()
+Ref<AudioBufferSourceNode> AudioContext::createBufferSource()
{
ALWAYS_LOG(LOGIDENTIFIER);
-
+
ASSERT(isMainThread());
-
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
Ref<AudioBufferSourceNode> node = AudioBufferSourceNode::create(*this, m_destinationNode->sampleRate());
@@ -456,14 +450,13 @@
ExceptionOr<Ref<MediaElementAudioSourceNode>> AudioContext::createMediaElementSource(HTMLMediaElement& mediaElement)
{
ALWAYS_LOG(LOGIDENTIFIER);
-
+
ASSERT(isMainThread());
-
- if (m_isStopScheduled || mediaElement.audioSourceNode())
+ lazyInitialize();
+
+ if (mediaElement.audioSourceNode())
return Exception { InvalidStateError };
- lazyInitialize();
-
auto node = MediaElementAudioSourceNode::create(*this, mediaElement);
mediaElement.setAudioSourceNode(node.ptr());
@@ -482,9 +475,6 @@
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
auto audioTracks = mediaStream.getAudioTracks();
if (audioTracks.isEmpty())
return Exception { InvalidStateError };
@@ -508,11 +498,8 @@
return node;
}
-ExceptionOr<Ref<MediaStreamAudioDestinationNode>> AudioContext::createMediaStreamDestination()
+Ref<MediaStreamAudioDestinationNode> AudioContext::createMediaStreamDestination()
{
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
// FIXME: Add support for an optional argument which specifies the number of channels.
// FIXME: The default should probably be stereo instead of mono.
return MediaStreamAudioDestinationNode::create(*this, 1);
@@ -525,10 +512,6 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
-
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
// W3C Editor's Draft 06 June 2017
@@ -584,87 +567,65 @@
return node;
}
-ExceptionOr<Ref<BiquadFilterNode>> AudioContext::createBiquadFilter()
+Ref<BiquadFilterNode> AudioContext::createBiquadFilter()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
-
return BiquadFilterNode::create(*this, m_destinationNode->sampleRate());
}
-ExceptionOr<Ref<WaveShaperNode>> AudioContext::createWaveShaper()
+Ref<WaveShaperNode> AudioContext::createWaveShaper()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return WaveShaperNode::create(*this);
}
-ExceptionOr<Ref<PannerNode>> AudioContext::createPanner()
+Ref<PannerNode> AudioContext::createPanner()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return PannerNode::create(*this, m_destinationNode->sampleRate());
}
-ExceptionOr<Ref<ConvolverNode>> AudioContext::createConvolver()
+Ref<ConvolverNode> AudioContext::createConvolver()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return ConvolverNode::create(*this, m_destinationNode->sampleRate());
}
-ExceptionOr<Ref<DynamicsCompressorNode>> AudioContext::createDynamicsCompressor()
+Ref<DynamicsCompressorNode> AudioContext::createDynamicsCompressor()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return DynamicsCompressorNode::create(*this, m_destinationNode->sampleRate());
}
-ExceptionOr<Ref<AnalyserNode>> AudioContext::createAnalyser()
+Ref<AnalyserNode> AudioContext::createAnalyser()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return AnalyserNode::create(*this, m_destinationNode->sampleRate());
}
-ExceptionOr<Ref<GainNode>> AudioContext::createGain()
+Ref<GainNode> AudioContext::createGain()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return GainNode::create(*this, m_destinationNode->sampleRate());
}
@@ -674,9 +635,6 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
return DelayNode::create(*this, m_destinationNode->sampleRate(), maxDelayTime);
}
@@ -686,9 +644,6 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
auto node = ChannelSplitterNode::create(*this, m_destinationNode->sampleRate(), numberOfOutputs);
if (!node)
@@ -701,9 +656,6 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
auto node = ChannelMergerNode::create(*this, m_destinationNode->sampleRate(), numberOfInputs);
if (!node)
@@ -711,14 +663,11 @@
return node.releaseNonNull();
}
-ExceptionOr<Ref<OscillatorNode>> AudioContext::createOscillator()
+Ref<OscillatorNode> AudioContext::createOscillator()
{
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
lazyInitialize();
Ref<OscillatorNode> node = OscillatorNode::create(*this, m_destinationNode->sampleRate());
@@ -735,9 +684,6 @@
ALWAYS_LOG(LOGIDENTIFIER);
ASSERT(isMainThread());
- if (m_isStopScheduled)
- return Exception { InvalidStateError };
-
if (real.length() != imaginary.length() || (real.length() > MaxPeriodicWaveLength) || !real.length())
return Exception { IndexSizeError };
lazyInitialize();
@@ -1132,7 +1078,7 @@
void AudioContext::startRendering()
{
ALWAYS_LOG(LOGIDENTIFIER);
- if (m_isStopScheduled || !willBeginPlayback())
+ if (!willBeginPlayback())
return;
destination()->startRendering();
@@ -1204,7 +1150,7 @@
void AudioContext::suspend(DOMPromiseDeferred<void>&& promise)
{
- if (isOfflineContext() || m_isStopScheduled) {
+ if (isOfflineContext()) {
promise.reject(InvalidStateError);
return;
}
@@ -1233,7 +1179,7 @@
void AudioContext::resume(DOMPromiseDeferred<void>&& promise)
{
- if (isOfflineContext() || m_isStopScheduled) {
+ if (isOfflineContext()) {
promise.reject(InvalidStateError);
return;
}
@@ -1262,7 +1208,7 @@
void AudioContext::close(DOMPromiseDeferred<void>&& promise)
{
- if (isOfflineContext() || m_isStopScheduled) {
+ if (isOfflineContext()) {
promise.reject(InvalidStateError);
return;
}
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.h (244796 => 244797)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.h 2019-04-30 20:08:01 UTC (rev 244796)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.h 2019-04-30 20:09:44 UTC (rev 244797)
@@ -134,26 +134,26 @@
bool wouldTaintOrigin(const URL&) const;
// The AudioNode create methods are called on the main thread (from _javascript_).
- ExceptionOr<Ref<AudioBufferSourceNode>> createBufferSource();
+ Ref<AudioBufferSourceNode> createBufferSource();
#if ENABLE(VIDEO)
ExceptionOr<Ref<MediaElementAudioSourceNode>> createMediaElementSource(HTMLMediaElement&);
#endif
#if ENABLE(MEDIA_STREAM)
ExceptionOr<Ref<MediaStreamAudioSourceNode>> createMediaStreamSource(MediaStream&);
- ExceptionOr<Ref<MediaStreamAudioDestinationNode>> createMediaStreamDestination();
+ Ref<MediaStreamAudioDestinationNode> createMediaStreamDestination();
#endif
- ExceptionOr<Ref<GainNode>> createGain();
- ExceptionOr<Ref<BiquadFilterNode>> createBiquadFilter();
- ExceptionOr<Ref<WaveShaperNode>> createWaveShaper();
+ Ref<GainNode> createGain();
+ Ref<BiquadFilterNode> createBiquadFilter();
+ Ref<WaveShaperNode> createWaveShaper();
ExceptionOr<Ref<DelayNode>> createDelay(double maxDelayTime);
- ExceptionOr<Ref<PannerNode>> createPanner();
- ExceptionOr<Ref<ConvolverNode>> createConvolver();
- ExceptionOr<Ref<DynamicsCompressorNode>> createDynamicsCompressor();
- ExceptionOr<Ref<AnalyserNode>> createAnalyser();
+ Ref<PannerNode> createPanner();
+ Ref<ConvolverNode> createConvolver();
+ Ref<DynamicsCompressorNode> createDynamicsCompressor();
+ Ref<AnalyserNode> createAnalyser();
ExceptionOr<Ref<ScriptProcessorNode>> createScriptProcessor(size_t bufferSize, size_t numberOfInputChannels, size_t numberOfOutputChannels);
ExceptionOr<Ref<ChannelSplitterNode>> createChannelSplitter(size_t numberOfOutputs);
ExceptionOr<Ref<ChannelMergerNode>> createChannelMerger(size_t numberOfInputs);
- ExceptionOr<Ref<OscillatorNode>> createOscillator();
+ Ref<OscillatorNode> createOscillator();
ExceptionOr<Ref<PeriodicWave>> createPeriodicWave(Float32Array& real, Float32Array& imaginary);
// When a source node has no more processing to do (has finished playing), then it tells the context to dereference it.
Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.idl (244796 => 244797)
--- trunk/Source/WebCore/Modules/webaudio/AudioContext.idl 2019-04-30 20:08:01 UTC (rev 244796)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.idl 2019-04-30 20:09:44 UTC (rev 244797)
@@ -69,24 +69,24 @@
void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback? successCallback, optional AudioBufferCallback? errorCallback);
// Sources
- [MayThrowException] AudioBufferSourceNode createBufferSource();
+ AudioBufferSourceNode createBufferSource();
[Conditional=VIDEO, MayThrowException] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
[Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
- [Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioDestinationNode createMediaStreamDestination();
+ [Conditional=MEDIA_STREAM] MediaStreamAudioDestinationNode createMediaStreamDestination();
// Processing nodes
- [MayThrowException] GainNode createGain();
+ GainNode createGain();
[MayThrowException] DelayNode createDelay(optional unrestricted double maxDelayTime = 1);
- [MayThrowException] BiquadFilterNode createBiquadFilter();
- [MayThrowException] WaveShaperNode createWaveShaper();
- [MayThrowException] PannerNode createPanner();
- [MayThrowException] ConvolverNode createConvolver();
- [MayThrowException] DynamicsCompressorNode createDynamicsCompressor();
- [MayThrowException] AnalyserNode createAnalyser();
+ BiquadFilterNode createBiquadFilter();
+ WaveShaperNode createWaveShaper();
+ PannerNode createPanner();
+ ConvolverNode createConvolver();
+ DynamicsCompressorNode createDynamicsCompressor();
+ AnalyserNode createAnalyser();
[MayThrowException] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2);
- [MayThrowException] OscillatorNode createOscillator();
+ OscillatorNode createOscillator();
[MayThrowException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
// Channel splitting and merging