Bug 1622490 - Add nsIMultiPartChannelListener forwarding to nsStreamListenerWrapper. r=mayhemer

Depends on D70660

Differential Revision: https://phabricator.services.mozilla.com/D70661

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2020-04-14 15:46:07 +00:00
Родитель fe8d230a3c
Коммит 2734904e17
2 изменённых файлов: 14 добавлений и 1 удалений

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

@ -11,7 +11,17 @@ namespace mozilla {
namespace net {
NS_IMPL_ISUPPORTS(nsStreamListenerWrapper, nsIStreamListener,
nsIRequestObserver, nsIThreadRetargetableStreamListener)
nsIRequestObserver, nsIMultiPartChannelListener,
nsIThreadRetargetableStreamListener)
NS_IMETHODIMP
nsStreamListenerWrapper::OnAfterLastPart(nsresult aStatus) {
if (nsCOMPtr<nsIMultiPartChannelListener> listener =
do_QueryInterface(mListener)) {
return listener->OnAfterLastPart(aStatus);
}
return NS_OK;
}
NS_IMETHODIMP
nsStreamListenerWrapper::CheckListenerChain() {

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

@ -8,6 +8,7 @@
#include "nsCOMPtr.h"
#include "nsIStreamListener.h"
#include "nsIThreadRetargetableStreamListener.h"
#include "nsIMultiPartChannel.h"
#include "mozilla/Attributes.h"
namespace mozilla {
@ -17,6 +18,7 @@ namespace net {
// from JavaScript possible. It is workaround for bug 433711 and 682305.
class nsStreamListenerWrapper final
: public nsIStreamListener,
public nsIMultiPartChannelListener,
public nsIThreadRetargetableStreamListener {
public:
explicit nsStreamListenerWrapper(nsIStreamListener* listener)
@ -27,6 +29,7 @@ class nsStreamListenerWrapper final
NS_DECL_THREADSAFE_ISUPPORTS
NS_FORWARD_SAFE_NSIREQUESTOBSERVER(mListener)
NS_FORWARD_SAFE_NSISTREAMLISTENER(mListener)
NS_DECL_NSIMULTIPARTCHANNELLISTENER
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
private: