summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/ftp/FTPChannelChild.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-23 10:46:00 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-23 13:56:01 +0100
commit1af286ffef9b71ed8dbe68b8d25484f47dfd75ec (patch)
treea6ff366a550e2e7d8331276283a7fdca39862363 /netwerk/protocol/ftp/FTPChannelChild.cpp
parentcc53748228bb4201d05dcbd2a7d7f8e05c80909b (diff)
downloadUXP-1af286ffef9b71ed8dbe68b8d25484f47dfd75ec.tar
UXP-1af286ffef9b71ed8dbe68b8d25484f47dfd75ec.tar.gz
UXP-1af286ffef9b71ed8dbe68b8d25484f47dfd75ec.tar.lz
UXP-1af286ffef9b71ed8dbe68b8d25484f47dfd75ec.tar.xz
UXP-1af286ffef9b71ed8dbe68b8d25484f47dfd75ec.zip
Convert UI-dictating FTP errors to console errors.
Diffstat (limited to 'netwerk/protocol/ftp/FTPChannelChild.cpp')
-rw-r--r--netwerk/protocol/ftp/FTPChannelChild.cpp41
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;