Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
| index ad21f7a0e81952fb79e562246e2ed20cc169aa67..db8c390b9cfdcd40e31785f3d8d39fd3419f31cb 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp |
| @@ -494,15 +494,22 @@ void PannerHandler::setChannelCountMode(const String& mode, ExceptionState& exce |
| // ---------------------------------------------------------------- |
| -PannerNode::PannerNode(AbstractAudioContext& context, float sampelRate) |
| +PannerNode::PannerNode(AbstractAudioContext& context) |
| : AudioNode(context) |
| { |
| - setHandler(PannerHandler::create(*this, sampelRate)); |
| + setHandler(PannerHandler::create(*this, context.sampleRate())); |
| } |
| -PannerNode* PannerNode::create(AbstractAudioContext& context, float sampleRate) |
| +PannerNode* PannerNode::create(AbstractAudioContext& context, ExceptionState& exceptionState) |
|
hongchan
2016/05/13 01:20:12
Over 80 cols.
|
| { |
| - return new PannerNode(context, sampleRate); |
| + ASSERT(isMainThread()); |
|
hongchan
2016/05/13 01:20:12
DCHECK.
Raymond Toy
2016/05/20 23:12:01
Done.
|
| + |
| + if (context.isContextClosed()) { |
| + context.throwExceptionForClosedState(exceptionState); |
| + return nullptr; |
| + } |
| + |
| + return new PannerNode(context); |
| } |
| PannerHandler& PannerNode::pannerHandler() const |