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..bf872633b2ab5dc1800c0ad9aa5abf1d296710d3 100644 |
--- a/content/renderer/media/rtc_peer_connection_handler.cc |
+++ b/content/renderer/media/rtc_peer_connection_handler.cc |
@@ -392,7 +392,11 @@ class CreateSessionDescriptionRequest |
protected: |
~CreateSessionDescriptionRequest() override { |
- DCHECK(main_thread_->BelongsToCurrentThread()); |
+ // This object is reference counted and its callback methods |OnSuccess| and |
+ // |OnFailure| may be invoked on any thread, for non-main threads the |
perkj_chrome
2016/08/17 11:16:14
I had problem reading the sentence
"This object
hbos_chromium
2016/08/17 13:53:26
Done.
|
+ // callback is posted to the main thread. Since the post may complete before |
+ // the non-main thread has dereferenced this object there is no guarantee |
+ // that this object is destructed on the main thread. |
DLOG_IF(ERROR, !webkit_request_.isNull()) |
<< "CreateSessionDescriptionRequest not completed. Shutting down?"; |
} |
@@ -441,7 +445,11 @@ class SetSessionDescriptionRequest |
protected: |
~SetSessionDescriptionRequest() override { |
- DCHECK(main_thread_->BelongsToCurrentThread()); |
+ // This object is reference counted and its callback methods |OnSuccess| and |
+ // |OnFailure| may be invoked on any thread, for non-main threads the |
+ // callback is posted to the main thread. Since the post may complete before |
+ // the non-main thread has dereferenced this object there is no guarantee |
+ // that this object is destructed on the main thread. |
DLOG_IF(ERROR, !webkit_request_.isNull()) |
<< "SetSessionDescriptionRequest not completed. Shutting down?"; |
} |