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; |
}; |