Issue #1587 - Part 3: Hook FetchSignal up to the Fetch API

This commit is contained in:
Moonchild 2020-06-10 21:51:44 +00:00 committed by Roy Tam
commit 78ff97aaf3
6 changed files with 292 additions and 30 deletions

View file

@ -37,6 +37,10 @@ FetchSignal::FetchSignal(FetchController* aController,
, mAborted(aAborted)
{}
FetchSignal::FetchSignal(bool aAborted)
: mAborted(aAborted)
{}
JSObject*
FetchSignal::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
@ -95,6 +99,10 @@ FetchSignal::CanAcceptFollower(FetchSignal::Follower* aFollower) const
{
MOZ_DIAGNOSTIC_ASSERT(aFollower);
if (!mController) {
return true;
}
if (aFollower == mController) {
return false;
}