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

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

Issue 2623473004: Replace all use of the VERIFY macro. (Closed)
Patch Set: Delete a DCHECK, instead log and return failure. And fix compile error in previous patch set. 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..6884aa4ea343a7d3baa4e840439f36f8b5b0cd56 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"
@@ -30,12 +29,18 @@ namespace cricket {
class scoped_voe_engine {
public:
explicit scoped_voe_engine(webrtc::VoiceEngine* e) : ptr(e) {}
- // VERIFY, to ensure that there are no leaks at shutdown
- ~scoped_voe_engine() { if (ptr) VERIFY(webrtc::VoiceEngine::Delete(ptr)); }
+ // RTC_DCHECK, to ensure that there are no leaks at shutdown
+ ~scoped_voe_engine() {
+ if (ptr) {
+ const bool success = webrtc::VoiceEngine::Delete(ptr);
+ RTC_DCHECK(success);
+ }
+ }
// Releases the current pointer.
void reset() {
if (ptr) {
- VERIFY(webrtc::VoiceEngine::Delete(ptr));
+ const bool success = webrtc::VoiceEngine::Delete(ptr);
+ RTC_DCHECK(success);
ptr = NULL;
}
}

Powered by Google App Engine
This is Rietveld 408576698