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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchManager.h

Issue 1749633002: Remove StopDetector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/FetchManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/fetch/FetchManager.h
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.h b/third_party/WebKit/Source/modules/fetch/FetchManager.h
index 74b38ee94d3e3f6a6a7c5035fc7ca5f0fc3c57a7..dde767ddd8b1b6138636b4416796e55a13e951e9 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.h
@@ -6,6 +6,7 @@
#define FetchManager_h
#include "bindings/core/v8/ScriptPromise.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -14,15 +15,14 @@ class ExecutionContext;
class FetchRequestData;
class ScriptState;
-class FetchManager final : public GarbageCollectedFinalized<FetchManager> {
+class FetchManager final : public GarbageCollectedFinalized<FetchManager>, public ContextLifecycleObserver {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FetchManager);
public:
- static FetchManager* create(ExecutionContext* executionContext)
- {
- return new FetchManager(executionContext);
- }
+ static FetchManager* create(ExecutionContext*);
+ explicit FetchManager(ExecutionContext*);
~FetchManager();
ScriptPromise fetch(ScriptState*, FetchRequestData*);
- void stop();
+ void contextDestroyed() override;
bool isStopped() const { return m_isStopped; }
DECLARE_TRACE();
@@ -30,11 +30,9 @@ public:
private:
class Loader;
- explicit FetchManager(ExecutionContext*);
// Removes loader from |m_loaders|.
void onLoaderFinished(Loader*);
- RawPtrWillBeMember<ExecutionContext> m_executionContext;
HeapHashSet<Member<Loader>> m_loaders;
bool m_isStopped;
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/FetchManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698