| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2011, 2012 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 void AssociatedURLLoader::cancelLoader() | 394 void AssociatedURLLoader::cancelLoader() |
| 395 { | 395 { |
| 396 if (!m_clientAdapter) | 396 if (!m_clientAdapter) |
| 397 return; | 397 return; |
| 398 | 398 |
| 399 // Prevent invocation of the WebURLLoaderClient methods. | 399 // Prevent invocation of the WebURLLoaderClient methods. |
| 400 m_clientAdapter->releaseClient(); | 400 m_clientAdapter->releaseClient(); |
| 401 | 401 |
| 402 if (m_loader) { | 402 if (m_loader) { |
| 403 m_loader->cancel(); | 403 m_loader->cancel(); |
| 404 m_loader.clear(); | 404 m_loader.reset(); |
| 405 } | 405 } |
| 406 m_clientAdapter.clear(); | 406 m_clientAdapter.reset(); |
| 407 } | 407 } |
| 408 | 408 |
| 409 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 409 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
| 410 { | 410 { |
| 411 if (m_loader) | 411 if (m_loader) |
| 412 m_loader->setDefersLoading(defersLoading); | 412 m_loader->setDefersLoading(defersLoading); |
| 413 } | 413 } |
| 414 | 414 |
| 415 void AssociatedURLLoader::setLoadingTaskRunner(blink::WebTaskRunner*) | 415 void AssociatedURLLoader::setLoadingTaskRunner(blink::WebTaskRunner*) |
| 416 { | 416 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 // there could be a WebURLLoader instance behind the | 449 // there could be a WebURLLoader instance behind the |
| 450 // DocumentThreadableLoader instance. So, for safety, we chose to just | 450 // DocumentThreadableLoader instance. So, for safety, we chose to just |
| 451 // crash here. | 451 // crash here. |
| 452 RELEASE_ASSERT(ThreadState::current()); | 452 RELEASE_ASSERT(ThreadState::current()); |
| 453 | 453 |
| 454 m_observer->dispose(); | 454 m_observer->dispose(); |
| 455 m_observer = nullptr; | 455 m_observer = nullptr; |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace blink | 458 } // namespace blink |
| OLD | NEW |