Commit 078a84e8 authored by rockot's avatar rockot Committed by Commit bot

Fix data race in IPC::ChannelProxy

Fixes a missing lock acquisition from the listener thread when
accessing |channel_|.

Also removes the TSAN suppression for this bug.

BUG=628481
TBR=glider@chromium.org for suppression removal

Review-Url: https://codereview.chromium.org/2158893002
Cr-Commit-Position: refs/heads/master@{#406033}
parent 1352ffd4
...@@ -267,9 +267,6 @@ char kTSanDefaultSuppressions[] = ...@@ -267,9 +267,6 @@ char kTSanDefaultSuppressions[] =
// http://crbug.com/582274 // http://crbug.com/582274
"race:usrsctp_close\n" "race:usrsctp_close\n"
// http://crbug.com/628481
"race:IPC::SyncChannel::SyncContext::OnChannelClose\n"
// End of suppressions. // End of suppressions.
; // Please keep this semicolon. ; // Please keep this semicolon.
......
...@@ -324,12 +324,15 @@ void ChannelProxy::Context::OnDispatchConnected() { ...@@ -324,12 +324,15 @@ void ChannelProxy::Context::OnDispatchConnected() {
if (channel_connected_called_) if (channel_connected_called_)
return; return;
if (channel_) { {
Channel::AssociatedInterfaceSupport* associated_interface_support = base::AutoLock l(channel_lifetime_lock_);
channel_->GetAssociatedInterfaceSupport(); if (channel_) {
if (associated_interface_support) { Channel::AssociatedInterfaceSupport* associated_interface_support =
channel_associated_group_.reset(new mojo::AssociatedGroup( channel_->GetAssociatedInterfaceSupport();
*associated_interface_support->GetAssociatedGroup())); if (associated_interface_support) {
channel_associated_group_.reset(new mojo::AssociatedGroup(
*associated_interface_support->GetAssociatedGroup()));
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment