Chromium Code Reviews| Index: Source/modules/webaudio/OfflineAudioContext.cpp |
| diff --git a/Source/modules/webaudio/OfflineAudioContext.cpp b/Source/modules/webaudio/OfflineAudioContext.cpp |
| index b79d2e5d259e5b22a4e383ac40f362a34e7231f1..6795d97eb8038e8ff10948ac455bc152bbafe2e3 100644 |
| --- a/Source/modules/webaudio/OfflineAudioContext.cpp |
| +++ b/Source/modules/webaudio/OfflineAudioContext.cpp |
| @@ -99,8 +99,18 @@ OfflineAudioContext::~OfflineAudioContext() |
| { |
| } |
| -ScriptPromise OfflineAudioContext::startOfflineRendering(ScriptState* scriptState) |
| +ScriptPromise OfflineAudioContext::startOfflineRendering(ScriptState* scriptState, ExceptionState& exceptionState) |
|
Raymond Toy
2015/04/29 15:54:42
Why is exceptionState needed here? It doesn't seem
|
| { |
| + // Calling close() on an OfflineAudioContext is not supported/allowed, |
| + // but it might well have been stopped by its execution context. |
| + if (isContextClosed()) { |
| + return ScriptPromise::rejectWithDOMException( |
| + scriptState, |
| + DOMException::create( |
| + InvalidStateError, |
| + "cannot call startRendering on an OfflineAudioContext in a stopped state.")); |
| + } |
| + |
| if (m_offlineResolver) { |
| // Can't call startRendering more than once. Return a rejected promise now. |
| return ScriptPromise::rejectWithDOMException( |