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 WTF_LOG(FileAPI, "FileReader: aborting\n"); | 336 WTF_LOG(FileAPI, "FileReader: aborting\n"); |
337 | 337 |
338 if (m_loadingState != LoadingStateLoading | 338 if (m_loadingState != LoadingStateLoading |
339 && m_loadingState != LoadingStatePending) { | 339 && m_loadingState != LoadingStatePending) { |
340 return; | 340 return; |
341 } | 341 } |
342 m_loadingState = LoadingStateAborted; | 342 m_loadingState = LoadingStateAborted; |
343 | 343 |
344 // Schedule to have the abort done later since abort() might be called from
the event handler and we do not want the resource loading code to be in the stac
k. | 344 // Schedule to have the abort done later since abort() might be called from
the event handler and we do not want the resource loading code to be in the stac
k. |
345 executionContext()->postTask( | 345 executionContext()->postTask( |
346 FROM_HERE, createSameThreadTask(&delayedAbort, this)); | 346 BLINK_FROM_HERE, createSameThreadTask(&delayedAbort, this)); |
347 } | 347 } |
348 | 348 |
349 void FileReader::doAbort() | 349 void FileReader::doAbort() |
350 { | 350 { |
351 ASSERT(m_state != DONE); | 351 ASSERT(m_state != DONE); |
352 | 352 |
353 terminate(); | 353 terminate(); |
354 | 354 |
355 m_error = FileError::create(FileError::ABORT_ERR); | 355 m_error = FileError::create(FileError::ABORT_ERR); |
356 | 356 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 } | 469 } |
470 | 470 |
471 DEFINE_TRACE(FileReader) | 471 DEFINE_TRACE(FileReader) |
472 { | 472 { |
473 visitor->trace(m_error); | 473 visitor->trace(m_error); |
474 RefCountedGarbageCollectedEventTargetWithInlineData<FileReader>::trace(visit
or); | 474 RefCountedGarbageCollectedEventTargetWithInlineData<FileReader>::trace(visit
or); |
475 ActiveDOMObject::trace(visitor); | 475 ActiveDOMObject::trace(visitor); |
476 } | 476 } |
477 | 477 |
478 } // namespace blink | 478 } // namespace blink |
OLD | NEW |