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

Unified Diff: ipc/ipc_channel_mojo.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
« no previous file with comments | « no previous file | ipc/ipc_sync_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_mojo.cc
diff --git a/ipc/ipc_channel_mojo.cc b/ipc/ipc_channel_mojo.cc
index d0129e3fe0833596ac3b576886f6d3e4ca54fd8f..402715f93edb226693019651402582ea231b1114 100644
--- a/ipc/ipc_channel_mojo.cc
+++ b/ipc/ipc_channel_mojo.cc
@@ -479,8 +479,11 @@ void ChannelMojo::AddGenericAssociatedInterface(
void ChannelMojo::GetGenericRemoteAssociatedInterface(
const std::string& name,
mojo::ScopedInterfaceEndpointHandle handle) {
- if (message_reader_)
+ if (message_reader_) {
message_reader_->GetRemoteInterface(name, std::move(handle));
+ } else {
+ mojo::GetIsolatedInterface(std::move(handle));
Ken Rockot(use gerrit already) 2017/03/24 19:20:03 nit: I might consider documenting here why we do t
yzshen1 2017/03/25 07:18:15 Done.
+ }
}
} // namespace IPC
« no previous file with comments | « no previous file | ipc/ipc_sync_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698