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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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
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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 request->setContext(WebURLRequest::RequestContextFetch); 918 request->setContext(WebURLRequest::RequestContextFetch);
919 919
920 Loader* loader = 920 Loader* loader =
921 Loader::create(getExecutionContext(), this, resolver, request, 921 Loader::create(getExecutionContext(), this, resolver, request,
922 scriptState->world().isIsolatedWorld()); 922 scriptState->world().isIsolatedWorld());
923 m_loaders.add(loader); 923 m_loaders.add(loader);
924 loader->start(); 924 loader->start();
925 return promise; 925 return promise;
926 } 926 }
927 927
928 void FetchManager::contextDestroyed() { 928 void FetchManager::contextDestroyed(ExecutionContext*) {
929 for (auto& loader : m_loaders) 929 for (auto& loader : m_loaders)
930 loader->dispose(); 930 loader->dispose();
931 } 931 }
932 932
933 void FetchManager::onLoaderFinished(Loader* loader) { 933 void FetchManager::onLoaderFinished(Loader* loader) {
934 m_loaders.remove(loader); 934 m_loaders.remove(loader);
935 loader->dispose(); 935 loader->dispose();
936 } 936 }
937 937
938 DEFINE_TRACE(FetchManager) { 938 DEFINE_TRACE(FetchManager) {
939 visitor->trace(m_loaders); 939 visitor->trace(m_loaders);
940 ContextLifecycleObserver::trace(visitor); 940 ContextLifecycleObserver::trace(visitor);
941 } 941 }
942 942
943 } // namespace blink 943 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchManager.h ('k') | third_party/WebKit/Source/modules/filesystem/FileWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698