Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit b6c4d8c

Browse files
committed
Bug 1574475 - Stop compiling FTP code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111245
1 parent 394f089 commit b6c4d8c

File tree

10 files changed

+1
-122
lines changed

10 files changed

+1
-122
lines changed

dom/webbrowserpersist/nsWebBrowserPersist.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "nsIThreadRetargetableRequest.h"
4343
#include "nsContentUtils.h"
4444

45-
#include "ftpCore.h"
4645
#include "nsIStringBundle.h"
4746
#include "nsIProtocolHandler.h"
4847

netwerk/build/components.conf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,6 @@ Classes = [
295295
'headers': ['mozilla/net/nsFileProtocolHandler.h'],
296296
'init_method': 'Init',
297297
},
298-
{
299-
'cid': '{25029490-f132-11d2-9588-00805f369f95}',
300-
'contract_ids': ['@mozilla.org/network/protocol;1?name=ftp'],
301-
'singleton': True,
302-
'type': 'nsFtpProtocolHandler',
303-
'headers': ['/netwerk/protocol/ftp/nsFtpProtocolHandler.h'],
304-
'init_method': 'Init',
305-
},
306298
{
307299
'cid': '{4f47e42e-4d23-4dd3-bfda-eb29255e9ea3}',
308300
'contract_ids': ['@mozilla.org/network/protocol;1?name=http'],

netwerk/build/moz.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ LOCAL_INCLUDES += [
2929
"/netwerk/protocol/about",
3030
"/netwerk/protocol/data",
3131
"/netwerk/protocol/file",
32-
"/netwerk/protocol/ftp",
3332
"/netwerk/protocol/http",
3433
"/netwerk/protocol/res",
3534
"/netwerk/protocol/viewsource",

netwerk/ipc/NeckoChannelParams.ipdlh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
77

88
include protocol PHttpChannel;
9-
include protocol PFTPChannel;
109
include protocol PChildToParentStream;
1110
include BlobTypes;
1211
include ClientIPCTypes;
@@ -387,31 +386,6 @@ struct ConsoleReportCollected {
387386
nsString[] stringParams;
388387
};
389388

390-
//-----------------------------------------------------------------------------
391-
// FTP IPDL structs
392-
//-----------------------------------------------------------------------------
393-
394-
struct FTPChannelOpenArgs
395-
{
396-
URIParams uri;
397-
uint64_t startPos;
398-
nsCString entityID;
399-
IPCStream? uploadStream;
400-
LoadInfoArgs? loadInfo;
401-
uint32_t loadFlags;
402-
};
403-
404-
struct FTPChannelConnectArgs
405-
{
406-
uint32_t channelId;
407-
};
408-
409-
union FTPChannelCreationArgs
410-
{
411-
FTPChannelOpenArgs; // For AsyncOpen: the common case.
412-
FTPChannelConnectArgs; // Used for redirected-to channels
413-
};
414-
415389
struct CookieStruct
416390
{
417391
nsCString name;

netwerk/ipc/NeckoChild.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "mozilla/dom/BrowserChild.h"
1212
#include "mozilla/net/HttpChannelChild.h"
1313
#include "mozilla/net/CookieServiceChild.h"
14-
#include "mozilla/net/FTPChannelChild.h"
1514
#include "mozilla/net/DataChannelChild.h"
1615
#ifdef MOZ_WIDGET_GTK
1716
# include "mozilla/net/GIOChannelChild.h"
@@ -128,22 +127,6 @@ bool NeckoChild::DeallocPAltDataOutputStreamChild(
128127
return true;
129128
}
130129

131-
PFTPChannelChild* NeckoChild::AllocPFTPChannelChild(
132-
PBrowserChild* aBrowser, const SerializedLoadContext& aSerialized,
133-
const FTPChannelCreationArgs& aOpenArgs) {
134-
// We don't allocate here: see FTPChannelChild::AsyncOpen()
135-
MOZ_CRASH("AllocPFTPChannelChild should not be called");
136-
return nullptr;
137-
}
138-
139-
bool NeckoChild::DeallocPFTPChannelChild(PFTPChannelChild* channel) {
140-
MOZ_ASSERT(IsNeckoChild(), "DeallocPFTPChannelChild called by non-child!");
141-
142-
FTPChannelChild* child = static_cast<FTPChannelChild*>(channel);
143-
child->ReleaseIPDLReference();
144-
return true;
145-
}
146-
147130
#ifdef MOZ_WIDGET_GTK
148131
PGIOChannelChild* NeckoChild::AllocPGIOChannelChild(
149132
PBrowserChild* aBrowser, const SerializedLoadContext& aSerialized,

netwerk/ipc/NeckoChild.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ class NeckoChild : public PNeckoChild {
3838

3939
PCookieServiceChild* AllocPCookieServiceChild();
4040
bool DeallocPCookieServiceChild(PCookieServiceChild*);
41-
PFTPChannelChild* AllocPFTPChannelChild(
42-
PBrowserChild* aBrowser, const SerializedLoadContext& aSerialized,
43-
const FTPChannelCreationArgs& aOpenArgs);
44-
bool DeallocPFTPChannelChild(PFTPChannelChild*);
4541
#ifdef MOZ_WIDGET_GTK
4642
PGIOChannelChild* AllocPGIOChannelChild(
4743
PBrowserChild* aBrowser, const SerializedLoadContext& aSerialized,

netwerk/ipc/NeckoParent.cpp

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "mozilla/net/NeckoParent.h"
1515
#include "mozilla/net/HttpChannelParent.h"
1616
#include "mozilla/net/CookieServiceParent.h"
17-
#include "mozilla/net/FTPChannelParent.h"
1817
#include "mozilla/net/WebSocketChannelParent.h"
1918
#include "mozilla/net/WebSocketEventListenerParent.h"
2019
#include "mozilla/net/DataChannelParent.h"
@@ -126,16 +125,6 @@ static already_AddRefed<nsIPrincipal> GetRequestingPrincipal(
126125
return GetRequestingPrincipal(args.loadInfo());
127126
}
128127

129-
static already_AddRefed<nsIPrincipal> GetRequestingPrincipal(
130-
const FTPChannelCreationArgs& aArgs) {
131-
if (aArgs.type() != FTPChannelCreationArgs::TFTPChannelOpenArgs) {
132-
return nullptr;
133-
}
134-
135-
const FTPChannelOpenArgs& args = aArgs.get_FTPChannelOpenArgs();
136-
return GetRequestingPrincipal(args.loadInfo());
137-
}
138-
139128
const char* NeckoParent::GetValidatedOriginAttributes(
140129
const SerializedLoadContext& aSerialized, PContentParent* aContent,
141130
nsIPrincipal* aRequestingPrincipal, OriginAttributes& aAttrs) {
@@ -278,47 +267,6 @@ bool NeckoParent::DeallocPAltDataOutputStreamParent(
278267
return true;
279268
}
280269

281-
PFTPChannelParent* NeckoParent::AllocPFTPChannelParent(
282-
PBrowserParent* aBrowser, const SerializedLoadContext& aSerialized,
283-
const FTPChannelCreationArgs& aOpenArgs) {
284-
nsCOMPtr<nsIPrincipal> requestingPrincipal =
285-
GetRequestingPrincipal(aOpenArgs);
286-
287-
nsCOMPtr<nsILoadContext> loadContext;
288-
const char* error = CreateChannelLoadContext(
289-
aBrowser, Manager(), aSerialized, requestingPrincipal, loadContext);
290-
if (error) {
291-
printf_stderr(
292-
"NeckoParent::AllocPFTPChannelParent: "
293-
"FATAL error: %s: KILLING CHILD PROCESS\n",
294-
error);
295-
return nullptr;
296-
}
297-
PBOverrideStatus overrideStatus =
298-
PBOverrideStatusFromLoadContext(aSerialized);
299-
FTPChannelParent* p = new FTPChannelParent(BrowserParent::GetFrom(aBrowser),
300-
loadContext, overrideStatus);
301-
p->AddRef();
302-
return p;
303-
}
304-
305-
bool NeckoParent::DeallocPFTPChannelParent(PFTPChannelParent* channel) {
306-
FTPChannelParent* p = static_cast<FTPChannelParent*>(channel);
307-
p->Release();
308-
return true;
309-
}
310-
311-
mozilla::ipc::IPCResult NeckoParent::RecvPFTPChannelConstructor(
312-
PFTPChannelParent* aActor, PBrowserParent* aBrowser,
313-
const SerializedLoadContext& aSerialized,
314-
const FTPChannelCreationArgs& aOpenArgs) {
315-
FTPChannelParent* p = static_cast<FTPChannelParent*>(aActor);
316-
if (!p->Init(aOpenArgs)) {
317-
return IPC_FAIL_NO_REASON(this);
318-
}
319-
return IPC_OK();
320-
}
321-
322270
already_AddRefed<PDocumentChannelParent>
323271
NeckoParent::AllocPDocumentChannelParent(
324272
const MaybeDiscarded<BrowsingContext>& aContext,

netwerk/ipc/NeckoParent.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@ class NeckoParent : public PNeckoParent {
110110
bool DeallocPAltDataOutputStreamParent(PAltDataOutputStreamParent* aActor);
111111

112112
bool DeallocPCookieServiceParent(PCookieServiceParent*);
113-
PFTPChannelParent* AllocPFTPChannelParent(
114-
PBrowserParent* aBrowser, const SerializedLoadContext& aSerialized,
115-
const FTPChannelCreationArgs& aOpenArgs);
116-
virtual mozilla::ipc::IPCResult RecvPFTPChannelConstructor(
117-
PFTPChannelParent* aActor, PBrowserParent* aBrowser,
118-
const SerializedLoadContext& aSerialized,
119-
const FTPChannelCreationArgs& aOpenArgs) override;
120-
bool DeallocPFTPChannelParent(PFTPChannelParent*);
121113
PWebSocketParent* AllocPWebSocketParent(
122114
PBrowserParent* browser, const SerializedLoadContext& aSerialized,
123115
const uint32_t& aSerial);

netwerk/ipc/PNecko.ipdl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ include protocol PContent;
99
include protocol PHttpChannel;
1010
include protocol PCookieService;
1111
include protocol PBrowser;
12-
include protocol PFTPChannel;
1312
#ifdef MOZ_WIDGET_GTK
1413
include protocol PGIOChannel;
1514
#endif
@@ -55,7 +54,6 @@ nested(upto inside_cpow) sync protocol PNecko
5554
manager PContent;
5655
manages PHttpChannel;
5756
manages PCookieService;
58-
manages PFTPChannel;
5957
manages PWebSocket;
6058
manages PWebSocketEventListener;
6159
manages PTCPSocket;
@@ -82,8 +80,6 @@ parent:
8280
async PHttpChannel(nullable PBrowser browser,
8381
SerializedLoadContext loadContext,
8482
HttpChannelCreationArgs args);
85-
async PFTPChannel(nullable PBrowser browser, SerializedLoadContext loadContext,
86-
FTPChannelCreationArgs args);
8783

8884
async PWebSocket(nullable PBrowser browser, SerializedLoadContext loadContext,
8985
uint32_t aSerialID);

netwerk/protocol/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7-
DIRS += ["about", "data", "file", "ftp"]
7+
DIRS += ["about", "data", "file"]
88
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
99
DIRS += ["gio"]
1010
DIRS += ["http", "res", "viewsource", "websocket"]

0 commit comments

Comments
 (0)