зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
fe8d230a3c
Коммит
2734904e17
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче