summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/webfilewriter_base.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/fileapi/webfilewriter_base.cc b/webkit/fileapi/webfilewriter_base.cc
index 7621a4f..d03fbe8 100644
--- a/webkit/fileapi/webfilewriter_base.cc
+++ b/webkit/fileapi/webfilewriter_base.cc
@@ -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.
@@ -54,7 +54,9 @@ void WebFileWriterBase::write(
// thing to come back is the cancel response. We only notify the
// AsyncFileWriterClient when it's all over.
void WebFileWriterBase::cancel() {
- DCHECK(kOperationWrite == operation_ || kOperationTruncate == operation_);
+ // Check for the cancel passing the previous operation's return in-flight.
+ if (kOperationWrite != operation_ && kOperationTruncate != operation_)
+ return;
if (kCancelNotInProgress != cancel_state_)
return;
cancel_state_ = kCancelSent;