Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1705)

Unified Diff: Source/modules/webaudio/AudioContext.h

Issue 1111213002: Treat a stopped AudioContext as closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: startRendering() doesn't (directly) raise an exception Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698