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

Unified Diff: mojo/system/handle_table.cc

Issue 502573006: Remove implicit conversions from scoped_refptr to T* in mojo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: mojo/system/handle_table.cc
diff --git a/mojo/system/handle_table.cc b/mojo/system/handle_table.cc
index 5281655336b223d93fab506c94dd5184b05f89ea..e05e365f242614bf96fc5b38d2d64461a59dd5e7 100644
--- a/mojo/system/handle_table.cc
+++ b/mojo/system/handle_table.cc
@@ -37,7 +37,7 @@ Dispatcher* HandleTable::GetDispatcher(MojoHandle handle) {
HandleToEntryMap::iterator it = handle_to_entry_map_.find(handle);
if (it == handle_to_entry_map_.end())
return NULL;
- return it->second.dispatcher;
+ return it->second.dispatcher.get();
}
MojoResult HandleTable::GetAndRemoveDispatcher(
@@ -89,7 +89,7 @@ bool HandleTable::AddDispatcherVector(const DispatcherVector& dispatchers,
return false;
for (size_t i = 0; i < dispatchers.size(); i++) {
- if (dispatchers[i]) {
+ if (dispatchers[i].get()) {
handles[i] = AddDispatcherNoSizeCheck(dispatchers[i]);
} else {
LOG(WARNING) << "Invalid dispatcher at index " << i;
@@ -186,7 +186,7 @@ MojoResult HandleTable::MarkBusyAndStartTransport(
MojoHandle HandleTable::AddDispatcherNoSizeCheck(
const scoped_refptr<Dispatcher>& dispatcher) {
- DCHECK(dispatcher);
+ DCHECK(dispatcher.get());
DCHECK_LT(handle_to_entry_map_.size(), kMaxHandleTableSize);
DCHECK_NE(next_handle_, MOJO_HANDLE_INVALID);

Powered by Google App Engine
This is Rietveld 408576698