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

Side by Side Diff: mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc

Issue 2494483003: Mojo Bindings: Fix lock-order inversion in associated controllers (Closed)
Patch Set: . Created 4 years, 1 month 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
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 "mojo/public/cpp/bindings/pipe_control_message_proxy.h" 5 #include "mojo/public/cpp/bindings/pipe_control_message_proxy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void PipeControlMessageProxy::NotifyPeerEndpointClosed(InterfaceId id) { 47 void PipeControlMessageProxy::NotifyPeerEndpointClosed(InterfaceId id) {
48 DCHECK(!IsMasterInterfaceId(id)); 48 DCHECK(!IsMasterInterfaceId(id));
49 pipe_control::PeerAssociatedEndpointClosedEventPtr event( 49 pipe_control::PeerAssociatedEndpointClosedEventPtr event(
50 pipe_control::PeerAssociatedEndpointClosedEvent::New()); 50 pipe_control::PeerAssociatedEndpointClosedEvent::New());
51 event->id = id; 51 event->id = id;
52 52
53 pipe_control::RunOrClosePipeInputPtr input( 53 pipe_control::RunOrClosePipeInputPtr input(
54 pipe_control::RunOrClosePipeInput::New()); 54 pipe_control::RunOrClosePipeInput::New());
55 input->set_peer_associated_endpoint_closed_event(std::move(event)); 55 input->set_peer_associated_endpoint_closed_event(std::move(event));
56 56
57 SendRunOrClosePipeMessage(receiver_, std::move(input), &context_); 57 internal::SerializationContext context;
58 SendRunOrClosePipeMessage(receiver_, std::move(input), &context);
58 } 59 }
59 60
60 void PipeControlMessageProxy::NotifyEndpointClosedBeforeSent(InterfaceId id) { 61 void PipeControlMessageProxy::NotifyEndpointClosedBeforeSent(InterfaceId id) {
61 DCHECK(!IsMasterInterfaceId(id)); 62 DCHECK(!IsMasterInterfaceId(id));
62 pipe_control::AssociatedEndpointClosedBeforeSentEventPtr event( 63 pipe_control::AssociatedEndpointClosedBeforeSentEventPtr event(
63 pipe_control::AssociatedEndpointClosedBeforeSentEvent::New()); 64 pipe_control::AssociatedEndpointClosedBeforeSentEvent::New());
64 event->id = id; 65 event->id = id;
65 66
66 pipe_control::RunOrClosePipeInputPtr input( 67 pipe_control::RunOrClosePipeInputPtr input(
67 pipe_control::RunOrClosePipeInput::New()); 68 pipe_control::RunOrClosePipeInput::New());
68 input->set_associated_endpoint_closed_before_sent_event(std::move(event)); 69 input->set_associated_endpoint_closed_before_sent_event(std::move(event));
69 70
70 SendRunOrClosePipeMessage(receiver_, std::move(input), &context_); 71 internal::SerializationContext context;
72 SendRunOrClosePipeMessage(receiver_, std::move(input), &context);
71 } 73 }
72 74
73 } // namespace mojo 75 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/pipe_control_message_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698