Index: Source/modules/webaudio/AudioContext.h |
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h |
index 603f63d30e0c050bc57c28b3fcae9b874548912b..f3ede043395820516c012854cd46da51b74a2bba 100644 |
--- a/Source/modules/webaudio/AudioContext.h |
+++ b/Source/modules/webaudio/AudioContext.h |
@@ -222,9 +222,11 @@ public: |
void fireCompletionEvent(); |
void notifyStateChange(); |
- // A context is considered closed if closeContext() has been called, even if the audio HW has |
- // not yet been stopped. It will be stopped eventually. |
- bool isContextClosed() const { return m_closeResolver; } |
+ // A context is considered closed if: |
+ // - closeContext() has been called, even if the audio HW has not yet been |
+ // stopped. It will be stopped eventually. |
+ // - it has been stopped (or is stopping) by its execution context. |
+ bool isContextClosed() const { return m_closeResolver || m_isStopScheduled || m_isCleared; } |
static unsigned s_hardwareContextCount; |
static unsigned s_contextId; |