Index: net/disk_cache/in_flight_io.cc |
diff --git a/net/disk_cache/in_flight_io.cc b/net/disk_cache/in_flight_io.cc |
index 5c859aff9ec8b093dd35eff589f531b64df1a0af..ba24d61124f29236515e09b8420532da17753101 100644 |
--- a/net/disk_cache/in_flight_io.cc |
+++ b/net/disk_cache/in_flight_io.cc |
@@ -74,14 +74,14 @@ void InFlightIO::InvokeCallback(BackgroundIO* operation, bool cancel_task) { |
// Make sure that we remove the operation from the list before invoking the |
// callback (so that a subsequent cancel does not invoke the callback again). |
DCHECK(io_list_.find(operation) != io_list_.end()); |
- io_list_.erase(operation); |
+ io_list_.erase(make_scoped_refptr(operation)); |
OnOperationComplete(operation, cancel_task); |
} |
// Runs on the primary thread. |
void InFlightIO::OnOperationPosted(BackgroundIO* operation) { |
DCHECK(callback_thread_->BelongsToCurrentThread()); |
- io_list_.insert(operation); |
+ io_list_.insert(make_scoped_refptr(operation)); |
} |
} // namespace disk_cache |