Index: content/child/shared_memory_data_consumer_handle.cc |
diff --git a/content/child/shared_memory_data_consumer_handle.cc b/content/child/shared_memory_data_consumer_handle.cc |
index cff0b116e5da8e591b5b89d35930e6408c8ec180..752ff7f70d80b30ae5c8eb23cf967f7a9fc5248b 100644 |
--- a/content/child/shared_memory_data_consumer_handle.cc |
+++ b/content/child/shared_memory_data_consumer_handle.cc |
@@ -108,8 +108,9 @@ class SharedMemoryDataConsumerHandle::Context final |
} |
void AcquireReaderLock(Client* client) { |
lock_.AssertAcquired(); |
- DCHECK(!notification_task_runner_); |
- DCHECK(!client_); |
+ // TODO(yhirano): Turn these CHECKs to DCHECKs once the crash is fixed. |
+ CHECK(!notification_task_runner_); |
+ CHECK(!client_); |
notification_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
client_ = client; |
if (client && !(IsEmpty() && result() == Ok)) { |
@@ -121,7 +122,9 @@ class SharedMemoryDataConsumerHandle::Context final |
} |
void ReleaseReaderLock() { |
lock_.AssertAcquired(); |
- DCHECK(notification_task_runner_); |
+ // TODO(yhirano): Turn these CHECKs to DCHECKs once the crash is fixed. |
+ CHECK(notification_task_runner_); |
+ CHECK(notification_task_runner_->BelongsToCurrentThread()); |
notification_task_runner_ = nullptr; |
client_ = nullptr; |
} |
@@ -223,7 +226,8 @@ class SharedMemoryDataConsumerHandle::Context final |
void Clear() { |
lock_.AssertAcquired(); |
ClearQueue(); |
- client_ = nullptr; |
+ // Turn this CHECK to DCHECK. |
+ CHECK(!client_); |
ResetOnReaderDetached(); |
} |
// Must be called with |lock_| not aquired. |