The logic for handling exceptions and such for each AudioNode is done in the the AbstractAudioContext::createFoo method. This logic should be moved to the FooNode::create. This will be important when we add contructors for the AudioNodes.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11 commit d3e0367d4b1f7637609f09f5fc3dbab97ae11b11 Author: rtoy <rtoy@chromium.org> Date: Wed May 25 16:51:52 2016 Move the exception logic to the AudioNode creator The logic for handling exceptions is mostly in AbstractAudioContext::createFoo() method. The right place for this is in the actual method that creates the node, FooNode::create(). Move the logic there. The result should be that AbstractAudioContext::createFoo() does nothing except call Foo::create() and returns the created node. This will be important when AudioNode constructors are added. BUG= 608766 TESTS=none; internal change that should be transparent. Review-Url: https://codereview.chromium.org/1952793002 Cr-Commit-Position: refs/heads/master@{#395914} [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/DelayNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/GainNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/GainNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/PannerNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/StereoPannerNode.h [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp [modify] https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h
Comment 1 by rtoy@chromium.org
, May 3 2016