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

Side by Side Diff: mojo/system/channel.cc

Issue 225863008: Mojo: Fix my LOG_IF(ERROR, ...) from r262803. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/system/channel.h" 5 #include "mojo/system/channel.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 base::AutoLock locker(lock_); 60 base::AutoLock locker(lock_);
61 DCHECK(raw_channel_.get()); 61 DCHECK(raw_channel_.get());
62 raw_channel_->Shutdown(); 62 raw_channel_->Shutdown();
63 raw_channel_.reset(); 63 raw_channel_.reset();
64 64
65 // This should not occur, but it probably mostly results in leaking; 65 // This should not occur, but it probably mostly results in leaking;
66 // (Explicitly clearing the |local_id_to_endpoint_info_map_| would likely put 66 // (Explicitly clearing the |local_id_to_endpoint_info_map_| would likely put
67 // things in an inconsistent state, which is worse. Note that if the map is 67 // things in an inconsistent state, which is worse. Note that if the map is
68 // nonempty, we probably won't be destroyed, since the endpoints have a 68 // nonempty, we probably won't be destroyed, since the endpoints have a
69 // reference to us.) 69 // reference to us.)
70 LOG_IF(ERROR, local_id_to_endpoint_info_map_.empty()) 70 LOG_IF(ERROR, !local_id_to_endpoint_info_map_.empty())
71 << "Channel shutting down with endpoints still attached"; 71 << "Channel shutting down with endpoints still attached";
72 // TODO(vtl): This currently blows up, but the fix will be nontrivial. 72 // TODO(vtl): This currently blows up, but the fix will be nontrivial.
73 // crbug.com/360081 73 // crbug.com/360081
74 //DCHECK(local_id_to_endpoint_info_map_.empty()); 74 //DCHECK(local_id_to_endpoint_info_map_.empty());
75 } 75 }
76 76
77 MessageInTransit::EndpointId Channel::AttachMessagePipeEndpoint( 77 MessageInTransit::EndpointId Channel::AttachMessagePipeEndpoint(
78 scoped_refptr<MessagePipe> message_pipe, unsigned port) { 78 scoped_refptr<MessagePipe> message_pipe, unsigned port) {
79 DCHECK(port == 0 || port == 1); 79 DCHECK(port == 0 || port == 1);
80 // Note: This assertion must *not* be done under |lock_|. 80 // Note: This assertion must *not* be done under |lock_|.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 LOG(WARNING) << error_message; 291 LOG(WARNING) << error_message;
292 } 292 }
293 293
294 void Channel::HandleLocalError(const base::StringPiece& error_message) { 294 void Channel::HandleLocalError(const base::StringPiece& error_message) {
295 // TODO(vtl): Is this how we really want to handle this? 295 // TODO(vtl): Is this how we really want to handle this?
296 LOG(WARNING) << error_message; 296 LOG(WARNING) << error_message;
297 } 297 }
298 298
299 } // namespace system 299 } // namespace system
300 } // namespace mojo 300 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698