| OLD | NEW |
| 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 #include "mojo/edk/system/handle_table.h" | 5 #include "mojo/edk/system/handle_table.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "mojo/edk/system/configuration.h" | 11 #include "mojo/edk/system/configuration.h" |
| 12 #include "mojo/edk/system/dispatcher.h" | 12 #include "mojo/edk/system/dispatcher.h" |
| 13 | 13 |
| 14 using mojo::util::RefPtr; |
| 15 |
| 14 namespace mojo { | 16 namespace mojo { |
| 15 namespace system { | 17 namespace system { |
| 16 | 18 |
| 17 HandleTable::Entry::Entry() : busy(false) { | 19 HandleTable::Entry::Entry() : busy(false) { |
| 18 } | 20 } |
| 19 | 21 |
| 20 HandleTable::Entry::Entry(RefPtr<Dispatcher>&& dispatcher) | 22 HandleTable::Entry::Entry(RefPtr<Dispatcher>&& dispatcher) |
| 21 : dispatcher(std::move(dispatcher)), busy(false) {} | 23 : dispatcher(std::move(dispatcher)), busy(false) {} |
| 22 | 24 |
| 23 HandleTable::Entry::~Entry() { | 25 HandleTable::Entry::~Entry() { |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 for (uint32_t i = 0; i < num_handles; i++) { | 235 for (uint32_t i = 0; i < num_handles; i++) { |
| 234 HandleToEntryMap::iterator it = handle_to_entry_map_.find(handles[i]); | 236 HandleToEntryMap::iterator it = handle_to_entry_map_.find(handles[i]); |
| 235 DCHECK(it != handle_to_entry_map_.end()); | 237 DCHECK(it != handle_to_entry_map_.end()); |
| 236 DCHECK(it->second.busy); | 238 DCHECK(it->second.busy); |
| 237 it->second.busy = false; | 239 it->second.busy = false; |
| 238 } | 240 } |
| 239 } | 241 } |
| 240 | 242 |
| 241 } // namespace system | 243 } // namespace system |
| 242 } // namespace mojo | 244 } // namespace mojo |
| OLD | NEW |