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

Unified Diff: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp

Issue 2805823003: Remove DCHECK_IS_ON() condition check around *.isGraphOwner() method (Closed)
Patch Set: Added comment Created 3 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
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
index f03fd8605b7ac20455be6adca4605713955ebb57..e68c8696194235502f704f4819b588ce7648f87e 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
@@ -65,11 +65,15 @@ void DeferredTaskHandler::offlineLock() {
m_contextGraphMutex.lock();
}
-#if DCHECK_IS_ON()
bool DeferredTaskHandler::isGraphOwner() {
+#if DCHECK_IS_ON()
return m_contextGraphMutex.locked();
-}
+#else
+ // The method is only used inside of DCHECK() so it must be no-op in the
+ // release build. Returning false so we can catch when it happens.
+ return false;
#endif
+}
void DeferredTaskHandler::addDeferredBreakConnection(AudioHandler& node) {
DCHECK(isAudioThread());
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698