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

Unified Diff: net/disk_cache/sparse_control.cc

Issue 9702059: Disk cache: Remove all non essential synchronization from the cache destructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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: net/disk_cache/sparse_control.cc
===================================================================
--- net/disk_cache/sparse_control.cc (revision 126788)
+++ net/disk_cache/sparse_control.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -442,6 +442,9 @@
if (!ChildPresent())
return ContinueWithoutChild(key);
+ if (!entry_->backend_)
+ return false;
+
child_ = entry_->backend_->OpenEntryImpl(key);
if (!child_)
return ContinueWithoutChild(key);
@@ -514,6 +517,9 @@
if (kGetRangeOperation == operation_)
return true;
+ if (!entry_->backend_)
+ return false;
+
child_ = entry_->backend_->CreateEntryImpl(key);
if (!child_) {
child_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698