Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchManager.cpp

Issue 2649323005: Cleanly detach XHR and other pending loader clients from Inspector. (Closed)
Patch Set: rebalance XHR disposal steps Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/eventsource/EventSource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/eventsource/EventSource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698