| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 CrossThreadPersistent<WorkerThreadableLoader> workerLoader = | 631 CrossThreadPersistent<WorkerThreadableLoader> workerLoader = |
| 632 m_workerLoader.get(); | 632 m_workerLoader.get(); |
| 633 if (!workerLoader || !m_forwarder) | 633 if (!workerLoader || !m_forwarder) |
| 634 return; | 634 return; |
| 635 m_forwarder->forwardTask( | 635 m_forwarder->forwardTask( |
| 636 BLINK_FROM_HERE, | 636 BLINK_FROM_HERE, |
| 637 createCrossThreadTask(&WorkerThreadableLoader::didReceiveResourceTiming, | 637 createCrossThreadTask(&WorkerThreadableLoader::didReceiveResourceTiming, |
| 638 workerLoader, info)); | 638 workerLoader, info)); |
| 639 } | 639 } |
| 640 | 640 |
| 641 void WorkerThreadableLoader::MainThreadLoaderHolder::contextDestroyed() { | 641 void WorkerThreadableLoader::MainThreadLoaderHolder::contextDestroyed( |
| 642 WorkerThreadLifecycleContext*) { |
| 642 DCHECK(isMainThread()); | 643 DCHECK(isMainThread()); |
| 643 if (m_forwarder) { | 644 if (m_forwarder) { |
| 644 m_forwarder->abort(); | 645 m_forwarder->abort(); |
| 645 m_forwarder = nullptr; | 646 m_forwarder = nullptr; |
| 646 } | 647 } |
| 647 cancel(); | 648 cancel(); |
| 648 } | 649 } |
| 649 | 650 |
| 650 DEFINE_TRACE(WorkerThreadableLoader::MainThreadLoaderHolder) { | 651 DEFINE_TRACE(WorkerThreadableLoader::MainThreadLoaderHolder) { |
| 651 visitor->trace(m_forwarder); | 652 visitor->trace(m_forwarder); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 669 ResourceLoaderOptions resourceLoaderOptions = originalResourceLoaderOptions; | 670 ResourceLoaderOptions resourceLoaderOptions = originalResourceLoaderOptions; |
| 670 resourceLoaderOptions.requestInitiatorContext = WorkerContext; | 671 resourceLoaderOptions.requestInitiatorContext = WorkerContext; |
| 671 // TODO(yhirano): Remove this CHECK once https://crbug.com/667254 is fixed. | 672 // TODO(yhirano): Remove this CHECK once https://crbug.com/667254 is fixed. |
| 672 CHECK(!m_mainThreadLoader); | 673 CHECK(!m_mainThreadLoader); |
| 673 m_mainThreadLoader = DocumentThreadableLoader::create(document, this, options, | 674 m_mainThreadLoader = DocumentThreadableLoader::create(document, this, options, |
| 674 resourceLoaderOptions); | 675 resourceLoaderOptions); |
| 675 m_mainThreadLoader->start(ResourceRequest(request.get())); | 676 m_mainThreadLoader->start(ResourceRequest(request.get())); |
| 676 } | 677 } |
| 677 | 678 |
| 678 } // namespace blink | 679 } // namespace blink |
| OLD | NEW |