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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 void AssociatedURLLoader::cancelLoader() | 397 void AssociatedURLLoader::cancelLoader() |
398 { | 398 { |
399 if (!m_clientAdapter) | 399 if (!m_clientAdapter) |
400 return; | 400 return; |
401 | 401 |
402 // Prevent invocation of the WebURLLoaderClient methods. | 402 // Prevent invocation of the WebURLLoaderClient methods. |
403 m_clientAdapter->releaseClient(); | 403 m_clientAdapter->releaseClient(); |
404 | 404 |
405 if (m_loader) { | 405 if (m_loader) { |
406 m_loader->cancel(); | 406 m_loader->cancel(); |
407 m_loader.reset(); | 407 m_loader = nullptr; |
408 } | 408 } |
409 m_clientAdapter.reset(); | 409 m_clientAdapter.reset(); |
410 } | 410 } |
411 | 411 |
412 void AssociatedURLLoader::setDefersLoading(bool defersLoading) | 412 void AssociatedURLLoader::setDefersLoading(bool defersLoading) |
413 { | 413 { |
414 if (m_loader) | 414 if (m_loader) |
415 m_loader->setDefersLoading(defersLoading); | 415 m_loader->setDefersLoading(defersLoading); |
416 } | 416 } |
417 | 417 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 // there could be a WebURLLoader instance behind the | 452 // there could be a WebURLLoader instance behind the |
453 // DocumentThreadableLoader instance. So, for safety, we chose to just | 453 // DocumentThreadableLoader instance. So, for safety, we chose to just |
454 // crash here. | 454 // crash here. |
455 RELEASE_ASSERT(ThreadState::current()); | 455 RELEASE_ASSERT(ThreadState::current()); |
456 | 456 |
457 m_observer->dispose(); | 457 m_observer->dispose(); |
458 m_observer = nullptr; | 458 m_observer = nullptr; |
459 } | 459 } |
460 | 460 |
461 } // namespace blink | 461 } // namespace blink |
OLD | NEW |