Bug 1478101 - Split AbortSignal in 2 classes: AbortSignal and AbortSignalImpl, r=bz

This commit is contained in:
Andrea Marchesini
2018-08-26 14:16:21 +02:00
parent c2329f57f7
commit b7196cdaf0
14 changed files with 196 additions and 134 deletions

View File

@@ -362,7 +362,7 @@ FetchDriver::~FetchDriver()
}
nsresult
FetchDriver::Fetch(AbortSignal* aSignal, FetchDriverObserver* aObserver)
FetchDriver::Fetch(AbortSignalImpl* aSignalImpl, FetchDriverObserver* aObserver)
{
AssertIsOnMainThread();
#ifdef DEBUG
@@ -391,13 +391,13 @@ FetchDriver::Fetch(AbortSignal* aSignal, FetchDriverObserver* aObserver)
// If the signal is aborted, it's time to inform the observer and terminate
// the operation.
if (aSignal) {
if (aSignal->Aborted()) {
if (aSignalImpl) {
if (aSignalImpl->Aborted()) {
Abort();
return NS_OK;
}
Follow(aSignal);
Follow(aSignalImpl);
}
rv = HttpFetch(mRequest->GetPreferredAlternativeDataType());