⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244797 in webkit


Ignore:
Timestamp:
Apr 30, 2019, 1:09:44 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

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

Location:
trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244794 r244797  
     12019-04-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244774.
     4        https://bugs.webkit.org/show_bug.cgi?id=197431
     5
     6        Causing assertion failures on debug queues (Requested by
     7        ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "Reject/throw when calling AudioContext methods on a stopped
     12        AudioContext"
     13        https://bugs.webkit.org/show_bug.cgi?id=197391
     14        https://trac.webkit.org/changeset/244774
     15
    1162019-04-30  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/LayoutTests/platform/win/TestExpectations

    r244774 r244797  
    495495# TODO For now, Web Audio tests are disabled
    496496webkit.org/b/86914 webaudio/ [ Skip ]
    497 webkit.org/b/86914 http/wpt/webaudio/ [ Skip ]
    498497webkit.org/b/86914 fast/history/page-cache-closed-audiocontext.html [ Skip ]
    499498webkit.org/b/86914 fast/history/page-cache-running-audiocontext.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r244794 r244797  
     12019-04-30  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244774.
     4        https://bugs.webkit.org/show_bug.cgi?id=197431
     5
     6        Causing assertion failures on debug queues (Requested by
     7        ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "Reject/throw when calling AudioContext methods on a stopped
     12        AudioContext"
     13        https://bugs.webkit.org/show_bug.cgi?id=197391
     14        https://trac.webkit.org/changeset/244774
     15
    1162019-04-30  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp

    r244774 r244797  
    217217void AudioContext::lazyInitialize()
    218218{
    219     ASSERT(!m_isStopScheduled);
    220 
    221219    if (m_isInitialized)
    222220        return;
     
    433431}
    434432
    435 ExceptionOr<Ref<AudioBufferSourceNode>> AudioContext::createBufferSource()
    436 {
    437     ALWAYS_LOG(LOGIDENTIFIER);
    438 
    439     ASSERT(isMainThread());
    440 
    441     if (m_isStopScheduled)
    442         return Exception { InvalidStateError };
    443 
     433Ref<AudioBufferSourceNode> AudioContext::createBufferSource()
     434{
     435    ALWAYS_LOG(LOGIDENTIFIER);
     436   
     437    ASSERT(isMainThread());
    444438    lazyInitialize();
    445439    Ref<AudioBufferSourceNode> node = AudioBufferSourceNode::create(*this, m_destinationNode->sampleRate());
     
    457451{
    458452    ALWAYS_LOG(LOGIDENTIFIER);
    459 
    460     ASSERT(isMainThread());
    461 
    462     if (m_isStopScheduled || mediaElement.audioSourceNode())
     453   
     454    ASSERT(isMainThread());
     455    lazyInitialize();
     456   
     457    if (mediaElement.audioSourceNode())
    463458        return Exception { InvalidStateError };
    464459
    465     lazyInitialize();
    466    
    467460    auto node = MediaElementAudioSourceNode::create(*this, mediaElement);
    468461
     
    482475   
    483476    ASSERT(isMainThread());
    484 
    485     if (m_isStopScheduled)
    486         return Exception { InvalidStateError };
    487477
    488478    auto audioTracks = mediaStream.getAudioTracks();
     
    509499}
    510500
    511 ExceptionOr<Ref<MediaStreamAudioDestinationNode>> AudioContext::createMediaStreamDestination()
    512 {
    513     if (m_isStopScheduled)
    514         return Exception { InvalidStateError };
    515 
     501Ref<MediaStreamAudioDestinationNode> AudioContext::createMediaStreamDestination()
     502{
    516503    // FIXME: Add support for an optional argument which specifies the number of channels.
    517504    // FIXME: The default should probably be stereo instead of mono.
     
    526513   
    527514    ASSERT(isMainThread());
    528 
    529     if (m_isStopScheduled)
    530         return Exception { InvalidStateError };
    531 
    532515    lazyInitialize();
    533516
     
    585568}
    586569
    587 ExceptionOr<Ref<BiquadFilterNode>> AudioContext::createBiquadFilter()
    588 {
    589     ALWAYS_LOG(LOGIDENTIFIER);
    590    
    591     ASSERT(isMainThread());
    592     if (m_isStopScheduled)
    593         return Exception { InvalidStateError };
    594 
    595     lazyInitialize();
    596 
     570Ref<BiquadFilterNode> AudioContext::createBiquadFilter()
     571{
     572    ALWAYS_LOG(LOGIDENTIFIER);
     573   
     574    ASSERT(isMainThread());
     575    lazyInitialize();
    597576    return BiquadFilterNode::create(*this, m_destinationNode->sampleRate());
    598577}
    599578
    600 ExceptionOr<Ref<WaveShaperNode>> AudioContext::createWaveShaper()
    601 {
    602     ALWAYS_LOG(LOGIDENTIFIER);
    603    
    604     ASSERT(isMainThread());
    605     if (m_isStopScheduled)
    606         return Exception { InvalidStateError };
    607 
     579Ref<WaveShaperNode> AudioContext::createWaveShaper()
     580{
     581    ALWAYS_LOG(LOGIDENTIFIER);
     582   
     583    ASSERT(isMainThread());
    608584    lazyInitialize();
    609585    return WaveShaperNode::create(*this);
    610586}
    611587
    612 ExceptionOr<Ref<PannerNode>> AudioContext::createPanner()
    613 {
    614     ALWAYS_LOG(LOGIDENTIFIER);
    615    
    616     ASSERT(isMainThread());
    617     if (m_isStopScheduled)
    618         return Exception { InvalidStateError };
    619 
     588Ref<PannerNode> AudioContext::createPanner()
     589{
     590    ALWAYS_LOG(LOGIDENTIFIER);
     591   
     592    ASSERT(isMainThread());
    620593    lazyInitialize();
    621594    return PannerNode::create(*this, m_destinationNode->sampleRate());
    622595}
    623596
    624 ExceptionOr<Ref<ConvolverNode>> AudioContext::createConvolver()
    625 {
    626     ALWAYS_LOG(LOGIDENTIFIER);
    627    
    628     ASSERT(isMainThread());
    629     if (m_isStopScheduled)
    630         return Exception { InvalidStateError };
    631 
     597Ref<ConvolverNode> AudioContext::createConvolver()
     598{
     599    ALWAYS_LOG(LOGIDENTIFIER);
     600   
     601    ASSERT(isMainThread());
    632602    lazyInitialize();
    633603    return ConvolverNode::create(*this, m_destinationNode->sampleRate());
    634604}
    635605
    636 ExceptionOr<Ref<DynamicsCompressorNode>> AudioContext::createDynamicsCompressor()
    637 {
    638     ALWAYS_LOG(LOGIDENTIFIER);
    639    
    640     ASSERT(isMainThread());
    641     if (m_isStopScheduled)
    642         return Exception { InvalidStateError };
    643 
     606Ref<DynamicsCompressorNode> AudioContext::createDynamicsCompressor()
     607{
     608    ALWAYS_LOG(LOGIDENTIFIER);
     609   
     610    ASSERT(isMainThread());
    644611    lazyInitialize();
    645612    return DynamicsCompressorNode::create(*this, m_destinationNode->sampleRate());
    646613}
    647614
    648 ExceptionOr<Ref<AnalyserNode>> AudioContext::createAnalyser()
    649 {
    650     ALWAYS_LOG(LOGIDENTIFIER);
    651    
    652     ASSERT(isMainThread());
    653     if (m_isStopScheduled)
    654         return Exception { InvalidStateError };
    655 
     615Ref<AnalyserNode> AudioContext::createAnalyser()
     616{
     617    ALWAYS_LOG(LOGIDENTIFIER);
     618   
     619    ASSERT(isMainThread());
    656620    lazyInitialize();
    657621    return AnalyserNode::create(*this, m_destinationNode->sampleRate());
    658622}
    659623
    660 ExceptionOr<Ref<GainNode>> AudioContext::createGain()
    661 {
    662     ALWAYS_LOG(LOGIDENTIFIER);
    663    
    664     ASSERT(isMainThread());
    665     if (m_isStopScheduled)
    666         return Exception { InvalidStateError };
    667 
     624Ref<GainNode> AudioContext::createGain()
     625{
     626    ALWAYS_LOG(LOGIDENTIFIER);
     627   
     628    ASSERT(isMainThread());
    668629    lazyInitialize();
    669630    return GainNode::create(*this, m_destinationNode->sampleRate());
     
    675636   
    676637    ASSERT(isMainThread());
    677     if (m_isStopScheduled)
    678         return Exception { InvalidStateError };
    679 
    680638    lazyInitialize();
    681639    return DelayNode::create(*this, m_destinationNode->sampleRate(), maxDelayTime);
     
    687645   
    688646    ASSERT(isMainThread());
    689     if (m_isStopScheduled)
    690         return Exception { InvalidStateError };
    691 
    692647    lazyInitialize();
    693648    auto node = ChannelSplitterNode::create(*this, m_destinationNode->sampleRate(), numberOfOutputs);
     
    702657   
    703658    ASSERT(isMainThread());
    704     if (m_isStopScheduled)
    705         return Exception { InvalidStateError };
    706 
    707659    lazyInitialize();
    708660    auto node = ChannelMergerNode::create(*this, m_destinationNode->sampleRate(), numberOfInputs);
     
    712664}
    713665
    714 ExceptionOr<Ref<OscillatorNode>> AudioContext::createOscillator()
    715 {
    716     ALWAYS_LOG(LOGIDENTIFIER);
    717    
    718     ASSERT(isMainThread());
    719     if (m_isStopScheduled)
    720         return Exception { InvalidStateError };
    721 
     666Ref<OscillatorNode> AudioContext::createOscillator()
     667{
     668    ALWAYS_LOG(LOGIDENTIFIER);
     669   
     670    ASSERT(isMainThread());
    722671    lazyInitialize();
    723672
     
    736685   
    737686    ASSERT(isMainThread());
    738     if (m_isStopScheduled)
    739         return Exception { InvalidStateError };
    740 
    741687    if (real.length() != imaginary.length() || (real.length() > MaxPeriodicWaveLength) || !real.length())
    742688        return Exception { IndexSizeError };
     
    11331079{
    11341080    ALWAYS_LOG(LOGIDENTIFIER);
    1135     if (m_isStopScheduled || !willBeginPlayback())
     1081    if (!willBeginPlayback())
    11361082        return;
    11371083
     
    12051151void AudioContext::suspend(DOMPromiseDeferred<void>&& promise)
    12061152{
    1207     if (isOfflineContext() || m_isStopScheduled) {
     1153    if (isOfflineContext()) {
    12081154        promise.reject(InvalidStateError);
    12091155        return;
     
    12341180void AudioContext::resume(DOMPromiseDeferred<void>&& promise)
    12351181{
    1236     if (isOfflineContext() || m_isStopScheduled) {
     1182    if (isOfflineContext()) {
    12371183        promise.reject(InvalidStateError);
    12381184        return;
     
    12631209void AudioContext::close(DOMPromiseDeferred<void>&& promise)
    12641210{
    1265     if (isOfflineContext() || m_isStopScheduled) {
     1211    if (isOfflineContext()) {
    12661212        promise.reject(InvalidStateError);
    12671213        return;
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.h

    r244774 r244797  
    135135
    136136    // The AudioNode create methods are called on the main thread (from JavaScript).
    137     ExceptionOr<Ref<AudioBufferSourceNode>> createBufferSource();
     137    Ref<AudioBufferSourceNode> createBufferSource();
    138138#if ENABLE(VIDEO)
    139139    ExceptionOr<Ref<MediaElementAudioSourceNode>> createMediaElementSource(HTMLMediaElement&);
     
    141141#if ENABLE(MEDIA_STREAM)
    142142    ExceptionOr<Ref<MediaStreamAudioSourceNode>> createMediaStreamSource(MediaStream&);
    143     ExceptionOr<Ref<MediaStreamAudioDestinationNode>> createMediaStreamDestination();
     143    Ref<MediaStreamAudioDestinationNode> createMediaStreamDestination();
    144144#endif
    145     ExceptionOr<Ref<GainNode>> createGain();
    146     ExceptionOr<Ref<BiquadFilterNode>> createBiquadFilter();
    147     ExceptionOr<Ref<WaveShaperNode>> createWaveShaper();
     145    Ref<GainNode> createGain();
     146    Ref<BiquadFilterNode> createBiquadFilter();
     147    Ref<WaveShaperNode> createWaveShaper();
    148148    ExceptionOr<Ref<DelayNode>> createDelay(double maxDelayTime);
    149     ExceptionOr<Ref<PannerNode>> createPanner();
    150     ExceptionOr<Ref<ConvolverNode>> createConvolver();
    151     ExceptionOr<Ref<DynamicsCompressorNode>> createDynamicsCompressor();
    152     ExceptionOr<Ref<AnalyserNode>> createAnalyser();
     149    Ref<PannerNode> createPanner();
     150    Ref<ConvolverNode> createConvolver();
     151    Ref<DynamicsCompressorNode> createDynamicsCompressor();
     152    Ref<AnalyserNode> createAnalyser();
    153153    ExceptionOr<Ref<ScriptProcessorNode>> createScriptProcessor(size_t bufferSize, size_t numberOfInputChannels, size_t numberOfOutputChannels);
    154154    ExceptionOr<Ref<ChannelSplitterNode>> createChannelSplitter(size_t numberOfOutputs);
    155155    ExceptionOr<Ref<ChannelMergerNode>> createChannelMerger(size_t numberOfInputs);
    156     ExceptionOr<Ref<OscillatorNode>> createOscillator();
     156    Ref<OscillatorNode> createOscillator();
    157157    ExceptionOr<Ref<PeriodicWave>> createPeriodicWave(Float32Array& real, Float32Array& imaginary);
    158158
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.idl

    r244774 r244797  
    7070
    7171    // Sources
    72     [MayThrowException] AudioBufferSourceNode createBufferSource();
     72    AudioBufferSourceNode createBufferSource();
    7373
    7474    [Conditional=VIDEO, MayThrowException] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
    7575
    7676    [Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);
    77     [Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioDestinationNode createMediaStreamDestination();
     77    [Conditional=MEDIA_STREAM] MediaStreamAudioDestinationNode createMediaStreamDestination();
    7878
    7979    // Processing nodes
    80     [MayThrowException] GainNode createGain();
     80    GainNode createGain();
    8181    [MayThrowException] DelayNode createDelay(optional unrestricted double maxDelayTime = 1);
    82     [MayThrowException] BiquadFilterNode createBiquadFilter();
    83     [MayThrowException] WaveShaperNode createWaveShaper();
    84     [MayThrowException] PannerNode createPanner();
    85     [MayThrowException] ConvolverNode createConvolver();
    86     [MayThrowException] DynamicsCompressorNode createDynamicsCompressor();
    87     [MayThrowException] AnalyserNode createAnalyser();
     82    BiquadFilterNode createBiquadFilter();
     83    WaveShaperNode createWaveShaper();
     84    PannerNode createPanner();
     85    ConvolverNode createConvolver();
     86    DynamicsCompressorNode createDynamicsCompressor();
     87    AnalyserNode createAnalyser();
    8888    [MayThrowException] ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2);
    89     [MayThrowException] OscillatorNode createOscillator();
     89    OscillatorNode createOscillator();
    9090    [MayThrowException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
    9191
Note: See TracChangeset for help on using the changeset viewer.