Bug 1301094 - part 1 - RemoteBlobImpl::CreateStreamHelper must be a CancelableRunnable, r=smaug

This commit is contained in:
Andrea Marchesini 2016-09-12 12:17:08 +02:00
Родитель 2af134acaf
Коммит 2a473b5013
1 изменённых файлов: 2 добавлений и 8 удалений

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

@ -1841,7 +1841,7 @@ protected:
};
class BlobChild::RemoteBlobImpl::CreateStreamHelper final
: public Runnable
: public CancelableRunnable
{
Monitor mMonitor;
RefPtr<RemoteBlobImpl> mRemoteBlobImpl;
@ -1856,8 +1856,7 @@ public:
nsresult
GetStream(nsIInputStream** aInputStream);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIRUNNABLE
NS_IMETHOD Run() override;
private:
~CreateStreamHelper()
@ -2382,8 +2381,6 @@ CreateStreamHelper::GetStream(nsIInputStream** aInputStream)
if (EventTargetIsOnCurrentThread(baseRemoteBlobImpl->GetActorEventTarget())) {
RunInternal(baseRemoteBlobImpl, false);
} else {
MOZ_ASSERT(!NS_IsMainThread());
nsCOMPtr<nsIEventTarget> target = baseRemoteBlobImpl->GetActorEventTarget();
if (!target) {
target = do_GetMainThread();
@ -2462,9 +2459,6 @@ CreateStreamHelper::RunInternal(RemoteBlobImpl* aBaseRemoteBlobImpl,
}
}
NS_IMPL_ISUPPORTS_INHERITED0(BlobChild::RemoteBlobImpl::CreateStreamHelper,
Runnable)
NS_IMETHODIMP
BlobChild::RemoteBlobImpl::
CreateStreamHelper::Run()