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

Unified Diff: ipc/ipc_sync_message_filter.cc

Issue 2772983002: Make sure channel-associated interface pointers are always safe to call. (Closed)
Patch Set: Created 3 years, 9 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
Index: ipc/ipc_sync_message_filter.cc
diff --git a/ipc/ipc_sync_message_filter.cc b/ipc/ipc_sync_message_filter.cc
index ffccff3d50889271ac0b4c0926b10f62eb9e4ea8..8f4eb6c62fbd8215928136052fbcfafc8373f0ee 100644
--- a/ipc/ipc_sync_message_filter.cc
+++ b/ipc/ipc_sync_message_filter.cc
@@ -276,8 +276,10 @@ void SyncMessageFilter::GetGenericRemoteAssociatedInterface(
mojo::ScopedInterfaceEndpointHandle handle) {
base::AutoLock auto_lock(lock_);
DCHECK(io_task_runner_ && io_task_runner_->BelongsToCurrentThread());
- if (!channel_)
+ if (!channel_) {
+ mojo::GetIsolatedInterface(std::move(handle));
return;
+ }
Channel::AssociatedInterfaceSupport* support =
channel_->GetAssociatedInterfaceSupport();

Powered by Google App Engine
This is Rietveld 408576698