| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/fetch/FetchManager.h" | 5 #include "modules/fetch/FetchManager.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/V8ThrowException.h" | 10 #include "bindings/core/v8/V8ThrowException.h" |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 | 669 |
| 670 // "- Otherwise | 670 // "- Otherwise |
| 671 // Set |request|'s response tainting to |CORS|." | 671 // Set |request|'s response tainting to |CORS|." |
| 672 m_request->setResponseTainting(FetchRequestData::CORSTainting); | 672 m_request->setResponseTainting(FetchRequestData::CORSTainting); |
| 673 // "The result of performing an HTTP fetch using |request| with the | 673 // "The result of performing an HTTP fetch using |request| with the |
| 674 // |CORS flag| set." | 674 // |CORS flag| set." |
| 675 performHTTPFetch(true, false); | 675 performHTTPFetch(true, false); |
| 676 } | 676 } |
| 677 | 677 |
| 678 void FetchManager::Loader::dispose() { | 678 void FetchManager::Loader::dispose() { |
| 679 InspectorInstrumentation::detachClientRequest(m_executionContext, this); |
| 679 // Prevent notification | 680 // Prevent notification |
| 680 m_fetchManager = nullptr; | 681 m_fetchManager = nullptr; |
| 681 if (m_loader) { | 682 if (m_loader) { |
| 682 m_loader->cancel(); | 683 m_loader->cancel(); |
| 683 m_loader = nullptr; | 684 m_loader = nullptr; |
| 684 } | 685 } |
| 685 m_executionContext = nullptr; | 686 m_executionContext = nullptr; |
| 686 } | 687 } |
| 687 | 688 |
| 688 void FetchManager::Loader::performBasicFetch() { | 689 void FetchManager::Loader::performBasicFetch() { |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 m_loaders.remove(loader); | 933 m_loaders.remove(loader); |
| 933 loader->dispose(); | 934 loader->dispose(); |
| 934 } | 935 } |
| 935 | 936 |
| 936 DEFINE_TRACE(FetchManager) { | 937 DEFINE_TRACE(FetchManager) { |
| 937 visitor->trace(m_loaders); | 938 visitor->trace(m_loaders); |
| 938 ContextLifecycleObserver::trace(visitor); | 939 ContextLifecycleObserver::trace(visitor); |
| 939 } | 940 } |
| 940 | 941 |
| 941 } // namespace blink | 942 } // namespace blink |
| OLD | NEW |