Changeset 244797 in webkit
- Timestamp:
- Apr 30, 2019, 1:09:44 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/wpt/webaudio (deleted)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/AudioContext.cpp (modified) (16 diffs)
-
Source/WebCore/Modules/webaudio/AudioContext.h (modified) (2 diffs)
-
Source/WebCore/Modules/webaudio/AudioContext.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r244794 r244797 1 2019-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 1 16 2019-04-30 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/LayoutTests/platform/win/TestExpectations
r244774 r244797 495 495 # TODO For now, Web Audio tests are disabled 496 496 webkit.org/b/86914 webaudio/ [ Skip ] 497 webkit.org/b/86914 http/wpt/webaudio/ [ Skip ]498 497 webkit.org/b/86914 fast/history/page-cache-closed-audiocontext.html [ Skip ] 499 498 webkit.org/b/86914 fast/history/page-cache-running-audiocontext.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r244794 r244797 1 2019-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 1 16 2019-04-30 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp
r244774 r244797 217 217 void AudioContext::lazyInitialize() 218 218 { 219 ASSERT(!m_isStopScheduled);220 221 219 if (m_isInitialized) 222 220 return; … … 433 431 } 434 432 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 433 Ref<AudioBufferSourceNode> AudioContext::createBufferSource() 434 { 435 ALWAYS_LOG(LOGIDENTIFIER); 436 437 ASSERT(isMainThread()); 444 438 lazyInitialize(); 445 439 Ref<AudioBufferSourceNode> node = AudioBufferSourceNode::create(*this, m_destinationNode->sampleRate()); … … 457 451 { 458 452 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()) 463 458 return Exception { InvalidStateError }; 464 459 465 lazyInitialize();466 467 460 auto node = MediaElementAudioSourceNode::create(*this, mediaElement); 468 461 … … 482 475 483 476 ASSERT(isMainThread()); 484 485 if (m_isStopScheduled)486 return Exception { InvalidStateError };487 477 488 478 auto audioTracks = mediaStream.getAudioTracks(); … … 509 499 } 510 500 511 ExceptionOr<Ref<MediaStreamAudioDestinationNode>> AudioContext::createMediaStreamDestination() 512 { 513 if (m_isStopScheduled) 514 return Exception { InvalidStateError }; 515 501 Ref<MediaStreamAudioDestinationNode> AudioContext::createMediaStreamDestination() 502 { 516 503 // FIXME: Add support for an optional argument which specifies the number of channels. 517 504 // FIXME: The default should probably be stereo instead of mono. … … 526 513 527 514 ASSERT(isMainThread()); 528 529 if (m_isStopScheduled)530 return Exception { InvalidStateError };531 532 515 lazyInitialize(); 533 516 … … 585 568 } 586 569 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 570 Ref<BiquadFilterNode> AudioContext::createBiquadFilter() 571 { 572 ALWAYS_LOG(LOGIDENTIFIER); 573 574 ASSERT(isMainThread()); 575 lazyInitialize(); 597 576 return BiquadFilterNode::create(*this, m_destinationNode->sampleRate()); 598 577 } 599 578 600 ExceptionOr<Ref<WaveShaperNode>> AudioContext::createWaveShaper() 601 { 602 ALWAYS_LOG(LOGIDENTIFIER); 603 604 ASSERT(isMainThread()); 605 if (m_isStopScheduled) 606 return Exception { InvalidStateError }; 607 579 Ref<WaveShaperNode> AudioContext::createWaveShaper() 580 { 581 ALWAYS_LOG(LOGIDENTIFIER); 582 583 ASSERT(isMainThread()); 608 584 lazyInitialize(); 609 585 return WaveShaperNode::create(*this); 610 586 } 611 587 612 ExceptionOr<Ref<PannerNode>> AudioContext::createPanner() 613 { 614 ALWAYS_LOG(LOGIDENTIFIER); 615 616 ASSERT(isMainThread()); 617 if (m_isStopScheduled) 618 return Exception { InvalidStateError }; 619 588 Ref<PannerNode> AudioContext::createPanner() 589 { 590 ALWAYS_LOG(LOGIDENTIFIER); 591 592 ASSERT(isMainThread()); 620 593 lazyInitialize(); 621 594 return PannerNode::create(*this, m_destinationNode->sampleRate()); 622 595 } 623 596 624 ExceptionOr<Ref<ConvolverNode>> AudioContext::createConvolver() 625 { 626 ALWAYS_LOG(LOGIDENTIFIER); 627 628 ASSERT(isMainThread()); 629 if (m_isStopScheduled) 630 return Exception { InvalidStateError }; 631 597 Ref<ConvolverNode> AudioContext::createConvolver() 598 { 599 ALWAYS_LOG(LOGIDENTIFIER); 600 601 ASSERT(isMainThread()); 632 602 lazyInitialize(); 633 603 return ConvolverNode::create(*this, m_destinationNode->sampleRate()); 634 604 } 635 605 636 ExceptionOr<Ref<DynamicsCompressorNode>> AudioContext::createDynamicsCompressor() 637 { 638 ALWAYS_LOG(LOGIDENTIFIER); 639 640 ASSERT(isMainThread()); 641 if (m_isStopScheduled) 642 return Exception { InvalidStateError }; 643 606 Ref<DynamicsCompressorNode> AudioContext::createDynamicsCompressor() 607 { 608 ALWAYS_LOG(LOGIDENTIFIER); 609 610 ASSERT(isMainThread()); 644 611 lazyInitialize(); 645 612 return DynamicsCompressorNode::create(*this, m_destinationNode->sampleRate()); 646 613 } 647 614 648 ExceptionOr<Ref<AnalyserNode>> AudioContext::createAnalyser() 649 { 650 ALWAYS_LOG(LOGIDENTIFIER); 651 652 ASSERT(isMainThread()); 653 if (m_isStopScheduled) 654 return Exception { InvalidStateError }; 655 615 Ref<AnalyserNode> AudioContext::createAnalyser() 616 { 617 ALWAYS_LOG(LOGIDENTIFIER); 618 619 ASSERT(isMainThread()); 656 620 lazyInitialize(); 657 621 return AnalyserNode::create(*this, m_destinationNode->sampleRate()); 658 622 } 659 623 660 ExceptionOr<Ref<GainNode>> AudioContext::createGain() 661 { 662 ALWAYS_LOG(LOGIDENTIFIER); 663 664 ASSERT(isMainThread()); 665 if (m_isStopScheduled) 666 return Exception { InvalidStateError }; 667 624 Ref<GainNode> AudioContext::createGain() 625 { 626 ALWAYS_LOG(LOGIDENTIFIER); 627 628 ASSERT(isMainThread()); 668 629 lazyInitialize(); 669 630 return GainNode::create(*this, m_destinationNode->sampleRate()); … … 675 636 676 637 ASSERT(isMainThread()); 677 if (m_isStopScheduled)678 return Exception { InvalidStateError };679 680 638 lazyInitialize(); 681 639 return DelayNode::create(*this, m_destinationNode->sampleRate(), maxDelayTime); … … 687 645 688 646 ASSERT(isMainThread()); 689 if (m_isStopScheduled)690 return Exception { InvalidStateError };691 692 647 lazyInitialize(); 693 648 auto node = ChannelSplitterNode::create(*this, m_destinationNode->sampleRate(), numberOfOutputs); … … 702 657 703 658 ASSERT(isMainThread()); 704 if (m_isStopScheduled)705 return Exception { InvalidStateError };706 707 659 lazyInitialize(); 708 660 auto node = ChannelMergerNode::create(*this, m_destinationNode->sampleRate(), numberOfInputs); … … 712 664 } 713 665 714 ExceptionOr<Ref<OscillatorNode>> AudioContext::createOscillator() 715 { 716 ALWAYS_LOG(LOGIDENTIFIER); 717 718 ASSERT(isMainThread()); 719 if (m_isStopScheduled) 720 return Exception { InvalidStateError }; 721 666 Ref<OscillatorNode> AudioContext::createOscillator() 667 { 668 ALWAYS_LOG(LOGIDENTIFIER); 669 670 ASSERT(isMainThread()); 722 671 lazyInitialize(); 723 672 … … 736 685 737 686 ASSERT(isMainThread()); 738 if (m_isStopScheduled)739 return Exception { InvalidStateError };740 741 687 if (real.length() != imaginary.length() || (real.length() > MaxPeriodicWaveLength) || !real.length()) 742 688 return Exception { IndexSizeError }; … … 1133 1079 { 1134 1080 ALWAYS_LOG(LOGIDENTIFIER); 1135 if ( m_isStopScheduled ||!willBeginPlayback())1081 if (!willBeginPlayback()) 1136 1082 return; 1137 1083 … … 1205 1151 void AudioContext::suspend(DOMPromiseDeferred<void>&& promise) 1206 1152 { 1207 if (isOfflineContext() || m_isStopScheduled) {1153 if (isOfflineContext()) { 1208 1154 promise.reject(InvalidStateError); 1209 1155 return; … … 1234 1180 void AudioContext::resume(DOMPromiseDeferred<void>&& promise) 1235 1181 { 1236 if (isOfflineContext() || m_isStopScheduled) {1182 if (isOfflineContext()) { 1237 1183 promise.reject(InvalidStateError); 1238 1184 return; … … 1263 1209 void AudioContext::close(DOMPromiseDeferred<void>&& promise) 1264 1210 { 1265 if (isOfflineContext() || m_isStopScheduled) {1211 if (isOfflineContext()) { 1266 1212 promise.reject(InvalidStateError); 1267 1213 return; -
trunk/Source/WebCore/Modules/webaudio/AudioContext.h
r244774 r244797 135 135 136 136 // The AudioNode create methods are called on the main thread (from JavaScript). 137 ExceptionOr<Ref<AudioBufferSourceNode>> createBufferSource();137 Ref<AudioBufferSourceNode> createBufferSource(); 138 138 #if ENABLE(VIDEO) 139 139 ExceptionOr<Ref<MediaElementAudioSourceNode>> createMediaElementSource(HTMLMediaElement&); … … 141 141 #if ENABLE(MEDIA_STREAM) 142 142 ExceptionOr<Ref<MediaStreamAudioSourceNode>> createMediaStreamSource(MediaStream&); 143 ExceptionOr<Ref<MediaStreamAudioDestinationNode>> createMediaStreamDestination();143 Ref<MediaStreamAudioDestinationNode> createMediaStreamDestination(); 144 144 #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(); 148 148 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(); 153 153 ExceptionOr<Ref<ScriptProcessorNode>> createScriptProcessor(size_t bufferSize, size_t numberOfInputChannels, size_t numberOfOutputChannels); 154 154 ExceptionOr<Ref<ChannelSplitterNode>> createChannelSplitter(size_t numberOfOutputs); 155 155 ExceptionOr<Ref<ChannelMergerNode>> createChannelMerger(size_t numberOfInputs); 156 ExceptionOr<Ref<OscillatorNode>> createOscillator();156 Ref<OscillatorNode> createOscillator(); 157 157 ExceptionOr<Ref<PeriodicWave>> createPeriodicWave(Float32Array& real, Float32Array& imaginary); 158 158 -
trunk/Source/WebCore/Modules/webaudio/AudioContext.idl
r244774 r244797 70 70 71 71 // Sources 72 [MayThrowException]AudioBufferSourceNode createBufferSource();72 AudioBufferSourceNode createBufferSource(); 73 73 74 74 [Conditional=VIDEO, MayThrowException] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); 75 75 76 76 [Conditional=MEDIA_STREAM, MayThrowException] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); 77 [Conditional=MEDIA_STREAM , MayThrowException] MediaStreamAudioDestinationNode createMediaStreamDestination();77 [Conditional=MEDIA_STREAM] MediaStreamAudioDestinationNode createMediaStreamDestination(); 78 78 79 79 // Processing nodes 80 [MayThrowException]GainNode createGain();80 GainNode createGain(); 81 81 [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(); 88 88 [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(); 90 90 [MayThrowException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag); 91 91
Note:
See TracChangeset
for help on using the changeset viewer.