summaryrefslogtreecommitdiffstats
path: root/dom/fetch/FetchController.cpp
diff options
context:
space:
mode:
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