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

Unified Diff: webrtc/media/engine/webrtcvoe.h

Issue 2623473004: Replace all use of the VERIFY macro. (Closed)
Patch Set: Tweaks after reviewing diff to master. Created 3 years, 10 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: webrtc/media/engine/webrtcvoe.h
diff --git a/webrtc/media/engine/webrtcvoe.h b/webrtc/media/engine/webrtcvoe.h
index 41a5b5fe6a157a8e47dec733018e9627ab9d80c4..45bc0689c91a71044577ff37d454c23e022f18c1 100644
--- a/webrtc/media/engine/webrtcvoe.h
+++ b/webrtc/media/engine/webrtcvoe.h
@@ -13,7 +13,6 @@
#include <memory>
-#include "webrtc/base/common.h"
#include "webrtc/media/engine/webrtccommon.h"
#include "webrtc/common_types.h"
@@ -31,11 +30,17 @@ class scoped_voe_engine {
public:
explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {}
// VERIFY, to ensure that there are no leaks at shutdown
kwiberg-webrtc 2017/02/07 09:39:49 Stale comment.
nisse-webrtc 2017/02/07 10:48:15 Updated.
- ~scoped_voe_engine() { if (ptr) VERIFY(webrtc::VoiceEngine::Delete(ptr)); }
+ ~scoped_voe_engine() {
+ if (ptr) {
+ bool res = webrtc::VoiceEngine::Delete(ptr);
+ RTC_DCHECK(res);
+ }
+ }
// Releases the current pointer.
void reset() {
if (ptr) {
- VERIFY(webrtc::VoiceEngine::Delete(ptr));
+ bool res = webrtc::VoiceEngine::Delete(ptr);
+ RTC_DCHECK(res);
ptr = NULL;
}
}

Powered by Google App Engine
This is Rietveld 408576698