| 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..1b9276b0bf736d6812f7572156da8cb7fa001475 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)
|
| {
|
| - return new PannerNode(context, sampleRate);
|
| + DCHECK(isMainThread());
|
| +
|
| + if (context.isContextClosed()) {
|
| + context.throwExceptionForClosedState(exceptionState);
|
| + return nullptr;
|
| + }
|
| +
|
| + return new PannerNode(context);
|
| }
|
|
|
| PannerHandler& PannerNode::pannerHandler() const
|
|
|