Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp |
| index 207bbf525e9b0f3dab5b8f0f63e134a353021113..f959e5b48f6ae8084581a669db58bc7d02ab20fe 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp |
| @@ -165,15 +165,22 @@ double ConvolverHandler::latencyTime() const |
| // ---------------------------------------------------------------- |
| -ConvolverNode::ConvolverNode(AbstractAudioContext& context, float sampleRate) |
| +ConvolverNode::ConvolverNode(AbstractAudioContext& context) |
| : AudioNode(context) |
| { |
| - setHandler(ConvolverHandler::create(*this, sampleRate)); |
| + setHandler(ConvolverHandler::create(*this, context.sampleRate())); |
| } |
| -ConvolverNode* ConvolverNode::create(AbstractAudioContext& context, float sampleRate) |
| +ConvolverNode* ConvolverNode::create(AbstractAudioContext& context, ExceptionState& exceptionState) |
| { |
| - return new ConvolverNode(context, sampleRate); |
| + ASSERT(isMainThread()); |
|
hongchan
2016/05/13 01:20:11
DCHECK?
Raymond Toy
2016/05/20 23:12:00
Done.
|
| + |
| + if (context.isContextClosed()) { |
|
hongchan
2016/05/13 01:20:11
Perhaps we can make this to a method? This check-a
Raymond Toy
2016/05/13 16:36:01
I thought about that. But we'd still have to do s
Raymond Toy
2016/05/13 18:41:47
After some further discussions, we decided it woul
|
| + context.throwExceptionForClosedState(exceptionState); |
| + return nullptr; |
| + } |
| + |
| + return new ConvolverNode(context); |
| } |
| ConvolverHandler& ConvolverNode::convolverHandler() const |