Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Issue 1952793002: Move the exception logic to the AudioNode creator (Closed)

Created:
4 years, 7 months ago by Raymond Toy
Modified:
4 years, 7 months ago
Reviewers:
hongchan
CC:
Raymond Toy, blink-reviews, chromium-reviews, haraken, hongchan
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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. Committed: https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11 Cr-Commit-Position: refs/heads/master@{#395914}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Rebase #

Patch Set 4 : Assert main thread in create() methods #

Patch Set 5 : Move more things to Node::create() #

Total comments: 76

Patch Set 6 : Use DCHECK instead of ASSERT #

Patch Set 7 : Address some review comments #

Total comments: 2

Patch Set 8 : Address review comments #

Total comments: 1

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Total comments: 3

Patch Set 11 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+594 lines, -406 lines) Patch
M third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp View 1 2 3 4 5 6 7 8 2 chunks +46 lines, -286 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AnalyserNode.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp View 1 2 3 4 5 1 chunk +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp View 1 chunk +15 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h View 2 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +31 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp View 1 2 3 4 5 6 7 8 2 chunks +34 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ConvolverNode.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/DelayNode.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/DelayNode.cpp View 1 2 3 4 5 6 7 8 2 chunks +28 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/GainNode.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/GainNode.cpp View 1 2 3 4 5 1 chunk +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/IIRFilterNode.h View 2 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp View 1 2 3 4 5 2 chunks +92 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +25 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp View 1 2 3 4 5 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +34 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/OscillatorNode.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/PannerNode.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/PannerNode.cpp View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/PeriodicWave.h View 2 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp View 1 2 3 4 5 6 7 8 2 chunks +29 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +81 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/StereoPannerNode.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
Raymond Toy
PTAL
4 years, 7 months ago (2016-05-12 23:31:43 UTC) #4
hongchan
I suggest we should go by Chromium style starting from this CL. You have used ...
4 years, 7 months ago (2016-05-13 01:20:13 UTC) #5
Raymond Toy
I'll fix the ASSERT issues, though since this is kind of new code. https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp File ...
4 years, 7 months ago (2016-05-13 15:59:51 UTC) #6
Raymond Toy
https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp File third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp (right): https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp#newcode178 third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp:178: if (context.isContextClosed()) { On 2016/05/13 01:20:11, hoch wrote: > ...
4 years, 7 months ago (2016-05-13 16:36:03 UTC) #7
Raymond Toy
https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp File third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp (right): https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp#newcode178 third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp:178: if (context.isContextClosed()) { On 2016/05/13 16:36:01, Raymond Toy wrote: ...
4 years, 7 months ago (2016-05-13 18:41:47 UTC) #8
hongchan
https://codereview.chromium.org/1952793002/diff/120001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp File third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp (right): https://codereview.chromium.org/1952793002/diff/120001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp#newcode267 third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp:267: Let's add a comment here. In fact, I think ...
4 years, 7 months ago (2016-05-13 21:35:48 UTC) #9
Raymond Toy
https://codereview.chromium.org/1952793002/diff/120001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp File third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp (right): https://codereview.chromium.org/1952793002/diff/120001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp#newcode267 third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp:267: On 2016/05/13 21:35:48, hoch wrote: > Let's add a ...
4 years, 7 months ago (2016-05-16 23:11:53 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1952793002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1952793002/160001
4 years, 7 months ago (2016-05-17 21:32:51 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 23:50:55 UTC) #14
Raymond Toy
PTAL
4 years, 7 months ago (2016-05-20 21:09:32 UTC) #15
hongchan
https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp File third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp (right): https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp#newcode355 third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp:355: // context keeps reference until we stop making javascript ...
4 years, 7 months ago (2016-05-20 21:28:32 UTC) #16
Raymond Toy
https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp File third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp (right): https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp#newcode355 third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp:355: // context keeps reference until we stop making javascript ...
4 years, 7 months ago (2016-05-20 21:46:10 UTC) #17
hongchan
https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp File third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp (right): https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp#newcode355 third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp:355: // context keeps reference until we stop making javascript ...
4 years, 7 months ago (2016-05-20 22:57:49 UTC) #18
Raymond Toy
https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp File third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp (right): https://codereview.chromium.org/1952793002/diff/80001/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp#newcode130 third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp:130: ASSERT(isMainThread()); On 2016/05/13 01:20:11, hoch wrote: > DCHECK? Done. ...
4 years, 7 months ago (2016-05-20 23:12:01 UTC) #19
hongchan
lgtm
4 years, 7 months ago (2016-05-24 20:44:06 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1952793002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1952793002/200001
4 years, 7 months ago (2016-05-25 15:19:20 UTC) #22
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 7 months ago (2016-05-25 16:52:04 UTC) #24
commit-bot: I haz the power
4 years, 7 months ago (2016-05-25 16:53:54 UTC) #26
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/d3e0367d4b1f7637609f09f5fc3dbab97ae11b11
Cr-Commit-Position: refs/heads/master@{#395914}

Powered by Google App Engine
This is Rietveld 408576698