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

Side by Side Diff: mojo/public/cpp/bindings/tests/associated_interface_unittest.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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_interface_ptr.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 auto provider_provider = binding.CreateInterfacePtrAndBind(); 1171 auto provider_provider = binding.CreateInterfacePtrAndBind();
1172 AssociatedPingProviderAssociatedPtr provider; 1172 AssociatedPingProviderAssociatedPtr provider;
1173 provider_provider->GetPingProvider(mojo::MakeRequest(&provider)); 1173 provider_provider->GetPingProvider(mojo::MakeRequest(&provider));
1174 PingServiceAssociatedPtr ping; 1174 PingServiceAssociatedPtr ping;
1175 provider->GetPing(mojo::MakeRequest(&ping)); 1175 provider->GetPing(mojo::MakeRequest(&ping));
1176 base::RunLoop run_loop; 1176 base::RunLoop run_loop;
1177 ping.set_connection_error_handler(run_loop.QuitClosure()); 1177 ping.set_connection_error_handler(run_loop.QuitClosure());
1178 run_loop.Run(); 1178 run_loop.Run();
1179 } 1179 }
1180 1180
1181 TEST_F(AssociatedInterfaceTest, GetIsolatedInterface) {
1182 IntegerSenderAssociatedPtr sender;
1183 GetIsolatedInterface(MakeRequest(&sender).PassHandle());
1184 sender->Send(42);
1185 }
1186
1181 } // namespace 1187 } // namespace
1182 } // namespace test 1188 } // namespace test
1183 } // namespace mojo 1189 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_interface_ptr.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698