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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 2222553002: Removed invalid thread DCHECKs in rtc_peer_connection_handler.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (Incorrectly thinking "this" was not ref counted when posting, not a fix) Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc
index 37b9d05cf8ecaee67b048bbefe03ff8a552d94b4..16ba6a0f4c5d033a70c113bbe1f17e186fc3807e 100644
--- a/content/renderer/media/rtc_peer_connection_handler.cc
+++ b/content/renderer/media/rtc_peer_connection_handler.cc
@@ -369,7 +369,9 @@ class CreateSessionDescriptionRequest
void OnSuccess(webrtc::SessionDescriptionInterface* desc) override {
perkj_chrome 2016/08/15 05:37:57 webrtc::SessionDescriptionInterface* desc should h
hbos_chromium 2016/08/15 14:16:55 Oh, back to the drawing board.
hbos_chromium 2016/08/16 13:43:51 The template magic of base::Bind is beyond me, but
hbos_chromium 2016/08/17 09:51:15 Nevermind. The different printfs can be explained
if (!main_thread_->BelongsToCurrentThread()) {
main_thread_->PostTask(FROM_HERE,
- base::Bind(&CreateSessionDescriptionRequest::OnSuccess, this, desc));
+ base::Bind(&CreateSessionDescriptionRequest::OnSuccess,
+ scoped_refptr<CreateSessionDescriptionRequest>(this),
+ desc));
return;
}
@@ -381,7 +383,9 @@ class CreateSessionDescriptionRequest
void OnFailure(const std::string& error) override {
if (!main_thread_->BelongsToCurrentThread()) {
main_thread_->PostTask(FROM_HERE,
- base::Bind(&CreateSessionDescriptionRequest::OnFailure, this, error));
+ base::Bind(&CreateSessionDescriptionRequest::OnFailure,
+ scoped_refptr<CreateSessionDescriptionRequest>(this),
+ error));
return;
}
@@ -421,7 +425,8 @@ class SetSessionDescriptionRequest
void OnSuccess() override {
if (!main_thread_->BelongsToCurrentThread()) {
main_thread_->PostTask(FROM_HERE,
- base::Bind(&SetSessionDescriptionRequest::OnSuccess, this));
+ base::Bind(&SetSessionDescriptionRequest::OnSuccess,
+ scoped_refptr<SetSessionDescriptionRequest>(this)));
return;
}
tracker_.TrackOnSuccess(NULL);
@@ -431,7 +436,9 @@ class SetSessionDescriptionRequest
void OnFailure(const std::string& error) override {
if (!main_thread_->BelongsToCurrentThread()) {
main_thread_->PostTask(FROM_HERE,
- base::Bind(&SetSessionDescriptionRequest::OnFailure, this, error));
+ base::Bind(&SetSessionDescriptionRequest::OnFailure,
+ scoped_refptr<SetSessionDescriptionRequest>(this),
+ error));
return;
}
tracker_.TrackOnFailure(error);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698