| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 AutoReset<bool> firingEvents(&m_stillFiringEvents, true); | 337 AutoReset<bool> firingEvents(&m_stillFiringEvents, true); |
| 338 | 338 |
| 339 // Setting error implicitly makes |result| return null. | 339 // Setting error implicitly makes |result| return null. |
| 340 m_error = FileError::createDOMException(FileError::kAbortErr); | 340 m_error = FileError::createDOMException(FileError::kAbortErr); |
| 341 | 341 |
| 342 // Unregister the reader. | 342 // Unregister the reader. |
| 343 ThrottlingController::FinishReaderType finalStep = | 343 ThrottlingController::FinishReaderType finalStep = |
| 344 ThrottlingController::removeReader(getExecutionContext(), this); | 344 ThrottlingController::removeReader(getExecutionContext(), this); |
| 345 | 345 |
| 346 fireEvent(EventTypeNames::error); | |
| 347 fireEvent(EventTypeNames::abort); | 346 fireEvent(EventTypeNames::abort); |
| 348 fireEvent(EventTypeNames::loadend); | 347 fireEvent(EventTypeNames::loadend); |
| 349 | 348 |
| 350 // All possible events have fired and we're done, no more pending activity. | 349 // All possible events have fired and we're done, no more pending activity. |
| 351 ThrottlingController::finishReader(getExecutionContext(), this, finalStep); | 350 ThrottlingController::finishReader(getExecutionContext(), this, finalStep); |
| 352 | 351 |
| 353 // ..but perform the loader cancellation asynchronously as abort() could be | 352 // ..but perform the loader cancellation asynchronously as abort() could be |
| 354 // called from the event handler and we do not want the resource loading code | 353 // called from the event handler and we do not want the resource loading code |
| 355 // to be on the stack when doing so. The persistent reference keeps the | 354 // to be on the stack when doing so. The persistent reference keeps the |
| 356 // reader alive until the task has completed. | 355 // reader alive until the task has completed. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 ProgressEvent::create(type, false, m_loader->bytesLoaded(), 0)); | 468 ProgressEvent::create(type, false, m_loader->bytesLoaded(), 0)); |
| 470 } | 469 } |
| 471 | 470 |
| 472 DEFINE_TRACE(FileReader) { | 471 DEFINE_TRACE(FileReader) { |
| 473 visitor->trace(m_error); | 472 visitor->trace(m_error); |
| 474 EventTargetWithInlineData::trace(visitor); | 473 EventTargetWithInlineData::trace(visitor); |
| 475 ContextLifecycleObserver::trace(visitor); | 474 ContextLifecycleObserver::trace(visitor); |
| 476 } | 475 } |
| 477 | 476 |
| 478 } // namespace blink | 477 } // namespace blink |
| OLD | NEW |