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

Side by Side Diff: mojo/public/cpp/bindings/binding.h

Issue 724563003: Avoid touching members in InterfaceImpl::ErrorHandlerImpl after calling OnConnectionError (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/interface_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
7 7
8 #include "mojo/public/c/environment/async_waiter.h" 8 #include "mojo/public/c/environment/async_waiter.h"
9 #include "mojo/public/cpp/bindings/error_handler.h" 9 #include "mojo/public/cpp/bindings/error_handler.h"
10 #include "mojo/public/cpp/bindings/interface_ptr.h" 10 #include "mojo/public/cpp/bindings/interface_ptr.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 Bind(ptr, waiter); 56 Bind(ptr, waiter);
57 } 57 }
58 58
59 Binding(Interface* impl, 59 Binding(Interface* impl,
60 InterfaceRequest<Interface> request, 60 InterfaceRequest<Interface> request,
61 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) 61 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter())
62 : Binding(impl) { 62 : Binding(impl) {
63 Bind(request.PassMessagePipe(), waiter); 63 Bind(request.PassMessagePipe(), waiter);
64 } 64 }
65 65
66 virtual ~Binding() { 66 ~Binding() override {
67 delete proxy_; 67 delete proxy_;
68 if (internal_router_) { 68 if (internal_router_) {
69 internal_router_->set_error_handler(nullptr); 69 internal_router_->set_error_handler(nullptr);
70 delete internal_router_; 70 delete internal_router_;
71 } 71 }
72 } 72 }
73 73
74 void Bind( 74 void Bind(
75 ScopedMessagePipeHandle handle, 75 ScopedMessagePipeHandle handle,
76 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { 76 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 typename Interface::Stub_ stub_; 127 typename Interface::Stub_ stub_;
128 Interface* impl_; 128 Interface* impl_;
129 ErrorHandler* error_handler_ = nullptr; 129 ErrorHandler* error_handler_ = nullptr;
130 130
131 MOJO_DISALLOW_COPY_AND_ASSIGN(Binding); 131 MOJO_DISALLOW_COPY_AND_ASSIGN(Binding);
132 }; 132 };
133 133
134 } // namespace mojo 134 } // namespace mojo
135 135
136 #endif // MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_ 136 #endif // MOJO_PUBLIC_CPP_BINDINGS_BINDING_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/interface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698