diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-23 10:46:00 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-03-23 10:46:00 +0100 |
commit | 976be87431d76148c386ffe25d86dad467311ed6 (patch) | |
tree | 610646ffc7a5d7602c8ba7ccde810d0400672aa8 /netwerk/protocol/ftp/FTPChannelChild.cpp | |
parent | 89d0316e3d3f80aed1e2c2266d8c19b66ceddaf8 (diff) | |
download | UXP-976be87431d76148c386ffe25d86dad467311ed6.tar UXP-976be87431d76148c386ffe25d86dad467311ed6.tar.gz UXP-976be87431d76148c386ffe25d86dad467311ed6.tar.lz UXP-976be87431d76148c386ffe25d86dad467311ed6.tar.xz UXP-976be87431d76148c386ffe25d86dad467311ed6.zip |
Convert UI-dictating FTP errors to console errors.
Diffstat (limited to 'netwerk/protocol/ftp/FTPChannelChild.cpp')
-rw-r--r-- | netwerk/protocol/ftp/FTPChannelChild.cpp | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/netwerk/protocol/ftp/FTPChannelChild.cpp b/netwerk/protocol/ftp/FTPChannelChild.cpp index f8284aae3..f52586744 100644 --- a/netwerk/protocol/ftp/FTPChannelChild.cpp +++ b/netwerk/protocol/ftp/FTPChannelChild.cpp @@ -516,33 +516,6 @@ FTPChannelChild::RecvOnStopRequest(const nsresult& aChannelStatus, return true; } -class nsFtpChildAsyncAlert : public Runnable -{ -public: - nsFtpChildAsyncAlert(nsIPrompt *aPrompter, nsString aResponseMsg) - : mPrompter(aPrompter) - , mResponseMsg(aResponseMsg) - { - MOZ_COUNT_CTOR(nsFtpChildAsyncAlert); - } -protected: - virtual ~nsFtpChildAsyncAlert() - { - MOZ_COUNT_DTOR(nsFtpChildAsyncAlert); - } -public: - NS_IMETHOD Run() override - { - if (mPrompter) { - mPrompter->Alert(nullptr, mResponseMsg.get()); - } - return NS_OK; - } -private: - nsCOMPtr<nsIPrompt> mPrompter; - nsString mResponseMsg; -}; - class MaybeDivertOnStopFTPEvent : public ChannelEvent { public: @@ -600,19 +573,7 @@ FTPChannelChild::DoOnStopRequest(const nsresult& aChannelStatus, (void)mListener->OnStopRequest(this, mListenerContext, aChannelStatus); if (NS_FAILED(aChannelStatus) && !aErrorMsg.IsEmpty()) { - nsCOMPtr<nsIPrompt> prompter; - GetCallback(prompter); - if (prompter) { - nsCOMPtr<nsIRunnable> alertEvent; - if (aUseUTF8) { - alertEvent = new nsFtpChildAsyncAlert(prompter, - NS_ConvertUTF8toUTF16(aErrorMsg)); - } else { - alertEvent = new nsFtpChildAsyncAlert(prompter, - NS_ConvertASCIItoUTF16(aErrorMsg)); - } - NS_DispatchToMainThread(alertEvent); - } + NS_ERROR("FTP error on stop request."); } mListener = nullptr; |