summaryrefslogtreecommitdiffstats
path: root/dom/fetch/FetchController.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-10 21:33:28 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-06-13 11:51:30 +0200
commit9e2da53a02356244c5dc0a3e7b7ec916740d3d51 (patch)
tree098aa27ce9fbcc0371e4f1bb52fac0f5541d7702 /dom/fetch/FetchController.cpp
parent2b41c85019bd5fd7e62556b5d5bf6ace2a6d6963 (diff)
downloadUXP-9e2da53a02356244c5dc0a3e7b7ec916740d3d51.tar
UXP-9e2da53a02356244c5dc0a3e7b7ec916740d3d51.tar.gz
UXP-9e2da53a02356244c5dc0a3e7b7ec916740d3d51.tar.lz
UXP-9e2da53a02356244c5dc0a3e7b7ec916740d3d51.tar.xz
UXP-9e2da53a02356244c5dc0a3e7b7ec916740d3d51.zip
Issue #1587 - Part 2: Implement controller follow/unfollow
Diffstat (limited to 'dom/fetch/FetchController.cpp')
-rw-r--r--dom/fetch/FetchController.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/dom/fetch/FetchController.cpp b/dom/fetch/FetchController.cpp
index b3d8a4d9c..2eb40b980 100644
--- a/dom/fetch/FetchController.cpp
+++ b/dom/fetch/FetchController.cpp
@@ -12,7 +12,8 @@
namespace mozilla {
namespace dom {
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FetchController, mGlobal, mSignal)
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FetchController, mGlobal, mSignal,
+ mFollowingSignal)
NS_IMPL_CYCLE_COLLECTING_ADDREF(FetchController)
NS_IMPL_CYCLE_COLLECTING_RELEASE(FetchController)
@@ -97,13 +98,29 @@ FetchController::Abort()
void
FetchController::Follow(FetchSignal& aSignal)
{
- // TODO
+ FetchSignal::Follower::Follow(&aSignal);
}
void
FetchController::Unfollow(FetchSignal& aSignal)
{
- // TODO
+ if (mFollowingSignal != &aSignal) {
+ return;
+ }
+
+ FetchSignal::Follower::Unfollow();
+}
+
+FetchSignal*
+FetchController::Following() const
+{
+ return mFollowingSignal;
+}
+
+void
+FetchController::Aborted()
+{
+ Abort();
}
} // dom namespace