Bug 1660555 - Make |AbortFollower| actually inherit from |nsISupports|. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D92323
This commit is contained in:
Jeff Walden 2020-10-29 08:02:05 +00:00
Родитель 1e16fcd4c3
Коммит 1be0ced0e4
3 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -19,10 +19,8 @@ class AbortSignalImpl;
// This class must be implemented by objects who want to follow a
// AbortSignalImpl.
class AbortFollower {
class AbortFollower : public nsISupports {
public:
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
virtual void RunAbortAlgorithm() = 0;
void Follow(AbortSignalImpl* aSignal);

Просмотреть файл

@ -141,7 +141,7 @@ class AbortSignalProxy final : public AbortFollower {
};
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AbortSignalProxy, override)
NS_DECL_THREADSAFE_ISUPPORTS
AbortSignalProxy(AbortSignalImpl* aSignalImpl,
nsIEventTarget* aMainThreadEventTarget)
@ -180,6 +180,8 @@ class AbortSignalProxy final : public AbortFollower {
}
};
NS_IMPL_ISUPPORTS0(AbortSignalProxy)
class WorkerFetchResolver final : public FetchDriverObserver {
// Thread-safe:
RefPtr<PromiseWorkerProxy> mPromiseProxy;

Просмотреть файл

@ -122,8 +122,9 @@ nsresult ExtractByteStreamFromBody(const fetch::ResponseBodyInit& aBodyInit,
template <class Derived>
class FetchBody : public BodyStreamHolder, public AbortFollower {
public:
using BodyStreamHolder::AddRef;
using BodyStreamHolder::Release;
using BodyStreamHolder::QueryInterface;
NS_INLINE_DECL_REFCOUNTING_INHERITED(FetchBody, BodyStreamHolder)
bool GetBodyUsed(ErrorResult& aRv) const;