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

Unified Diff: chrome/renderer/media/cast_ipc_dispatcher.cc

Issue 169063003: Cast: make global_instance_ more strict (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | content/public/test/mock_render_thread.cc » ('j') | content/public/test/mock_render_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/cast_ipc_dispatcher.cc
diff --git a/chrome/renderer/media/cast_ipc_dispatcher.cc b/chrome/renderer/media/cast_ipc_dispatcher.cc
index 3d71e922035e48bc9cab52832ae859d8377b1060..cb8c6ea17d9e2e01f6dba458e6290c1888a68d31 100644
--- a/chrome/renderer/media/cast_ipc_dispatcher.cc
+++ b/chrome/renderer/media/cast_ipc_dispatcher.cc
@@ -20,8 +20,7 @@ CastIPCDispatcher::CastIPCDispatcher(
CastIPCDispatcher::~CastIPCDispatcher() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
- // Unfortunately, you do not always get a OnFilterRemoved call.
- global_instance_ = NULL;
+ DCHECK(!global_instance_);
}
CastIPCDispatcher* CastIPCDispatcher::Get() {
@@ -74,6 +73,7 @@ void CastIPCDispatcher::OnFilterRemoved() {
void CastIPCDispatcher::OnChannelClosing() {
DCHECK(io_message_loop_->BelongsToCurrentThread());
DCHECK_EQ(this, global_instance_);
+ global_instance_ = NULL;
acolwell GONE FROM CHROMIUM 2014/02/19 00:11:24 Doesn't the DCHECK in OnFilterRemoved() fire if yo
hubbe 2014/02/19 00:29:51 You're right. Fixed.
channel_ = NULL;
}
« no previous file with comments | « no previous file | content/public/test/mock_render_thread.cc » ('j') | content/public/test/mock_render_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698