| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |