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

Side by Side Diff: Source/modules/filesystem/FileWriter.cpp

Issue 267253008: [FileAPI] Drop irrelevant ASSERT in FileWriter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 226
227 void FileWriter::didFail(blink::WebFileError code) 227 void FileWriter::didFail(blink::WebFileError code)
228 { 228 {
229 ASSERT(m_operationInProgress != OperationNone); 229 ASSERT(m_operationInProgress != OperationNone);
230 ASSERT(static_cast<FileError::ErrorCode>(code) != FileError::OK); 230 ASSERT(static_cast<FileError::ErrorCode>(code) != FileError::OK);
231 if (m_operationInProgress == OperationAbort) { 231 if (m_operationInProgress == OperationAbort) {
232 completeAbort(); 232 completeAbort();
233 return; 233 return;
234 } 234 }
235 ASSERT(static_cast<FileError::ErrorCode>(code) != FileError::ABORT_ERR);
236 ASSERT(m_queuedOperation == OperationNone); 235 ASSERT(m_queuedOperation == OperationNone);
237 ASSERT(m_readyState == WRITING); 236 ASSERT(m_readyState == WRITING);
238 m_blobBeingWritten.clear(); 237 m_blobBeingWritten.clear();
239 m_operationInProgress = OperationNone; 238 m_operationInProgress = OperationNone;
240 signalCompletion(static_cast<FileError::ErrorCode>(code)); 239 signalCompletion(static_cast<FileError::ErrorCode>(code));
241 unsetPendingActivity(this); 240 unsetPendingActivity(this);
242 } 241 }
243 242
244 void FileWriter::completeAbort() 243 void FileWriter::completeAbort()
245 { 244 {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 319 }
321 320
322 void FileWriter::trace(Visitor* visitor) 321 void FileWriter::trace(Visitor* visitor)
323 { 322 {
324 visitor->trace(m_error); 323 visitor->trace(m_error);
325 visitor->trace(m_blobBeingWritten); 324 visitor->trace(m_blobBeingWritten);
326 FileWriterBase::trace(visitor); 325 FileWriterBase::trace(visitor);
327 } 326 }
328 327
329 } // namespace WebCore 328 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698