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

Side by Side Diff: mojo/public/cpp/bindings/lib/interface_impl_internal.h

Issue 480663003: Converts some DCHECKs into CHECKs in hopes of helping with a crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/cpp/bindings/lib/connector.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 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_LIB_INTERFACE_IMPL_INTERNAL_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_IMPL_INTERNAL_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_IMPL_INTERNAL_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_IMPL_INTERNAL_H_
7 7
8 #include "mojo/public/cpp/bindings/error_handler.h" 8 #include "mojo/public/cpp/bindings/error_handler.h"
9 #include "mojo/public/cpp/bindings/interface_ptr.h" 9 #include "mojo/public/cpp/bindings/interface_ptr.h"
10 #include "mojo/public/cpp/bindings/lib/filter_chain.h" 10 #include "mojo/public/cpp/bindings/lib/filter_chain.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool instance_bound_to_pipe, 58 bool instance_bound_to_pipe,
59 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { 59 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
60 MessagePipe pipe; 60 MessagePipe pipe;
61 ptr->Bind(pipe.handle0.Pass(), waiter); 61 ptr->Bind(pipe.handle0.Pass(), waiter);
62 Bind(pipe.handle1.Pass(), instance_bound_to_pipe, waiter); 62 Bind(pipe.handle1.Pass(), instance_bound_to_pipe, waiter);
63 } 63 }
64 64
65 void Bind(ScopedMessagePipeHandle handle, 65 void Bind(ScopedMessagePipeHandle handle,
66 bool instance_bound_to_pipe, 66 bool instance_bound_to_pipe,
67 const MojoAsyncWaiter* waiter) { 67 const MojoAsyncWaiter* waiter) {
68 MOJO_DCHECK(!router_); 68 MOJO_CHECK(!router_);
69 69
70 FilterChain filters; 70 FilterChain filters;
71 filters.Append<MessageHeaderValidator>(); 71 filters.Append<MessageHeaderValidator>();
72 filters.Append<typename Interface::RequestValidator_>(); 72 filters.Append<typename Interface::RequestValidator_>();
73 filters.Append<typename Interface::Client::ResponseValidator_>(); 73 filters.Append<typename Interface::Client::ResponseValidator_>();
74 74
75 router_ = new Router(handle.Pass(), filters.Pass(), waiter); 75 router_ = new Router(handle.Pass(), filters.Pass(), waiter);
76 router_->set_incoming_receiver(&stub_); 76 router_->set_incoming_receiver(&stub_);
77 router_->set_error_handler(this); 77 router_->set_error_handler(this);
78 78
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool deleting_instance_due_to_error_; 119 bool deleting_instance_due_to_error_;
120 #endif 120 #endif
121 121
122 MOJO_DISALLOW_COPY_AND_ASSIGN(InterfaceImplState); 122 MOJO_DISALLOW_COPY_AND_ASSIGN(InterfaceImplState);
123 }; 123 };
124 124
125 } // namespace internal 125 } // namespace internal
126 } // namespace mojo 126 } // namespace mojo
127 127
128 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_IMPL_INTERNAL_H_ 128 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_IMPL_INTERNAL_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/connector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698