diff --git a/netwerk/base/nsIStandardURL.idl b/netwerk/base/nsIStandardURL.idl index eef5a6fb5088..633d184abc39 100644 --- a/netwerk/base/nsIStandardURL.idl +++ b/netwerk/base/nsIStandardURL.idl @@ -40,14 +40,6 @@ interface nsIStandardURL : nsIMutable * blah:///foo/bar => blah:///foo/bar */ const unsigned long URLTYPE_NO_AUTHORITY = 3; - - void init(in unsigned long aUrlType, - in long aDefaultPort, - in AUTF8String aSpec, - in string aOriginCharset, - in nsIURI aBaseURI); - - void setDefaultPort(in long aNewDefaultPort); }; [scriptable, builtinclass, uuid(fc894e98-23a1-43cd-a7fe-72876f8ea2ee)] diff --git a/netwerk/base/nsStandardURL.cpp b/netwerk/base/nsStandardURL.cpp index ce0d9a897d53..d1b5cb1d28f7 100644 --- a/netwerk/base/nsStandardURL.cpp +++ b/netwerk/base/nsStandardURL.cpp @@ -3298,7 +3298,7 @@ nsStandardURL::SetFile(nsIFile *file) // nsStandardURL::nsIStandardURL //---------------------------------------------------------------------------- -NS_IMETHODIMP +nsresult nsStandardURL::Init(uint32_t urlType, int32_t defaultPort, const nsACString &spec, @@ -3355,7 +3355,7 @@ nsStandardURL::Init(uint32_t urlType, return SetSpecWithEncoding(buf, encoding); } -NS_IMETHODIMP +nsresult nsStandardURL::SetDefaultPort(int32_t aNewDefaultPort) { ENSURE_MUTABLE(); diff --git a/netwerk/base/nsStandardURL.h b/netwerk/base/nsStandardURL.h index 54b37d9b1590..a66848a95bac 100644 --- a/netwerk/base/nsStandardURL.h +++ b/netwerk/base/nsStandardURL.h @@ -181,6 +181,10 @@ protected: virtual nsresult EnsureFile(); private: + nsresult Init(uint32_t urlType, int32_t defaultPort, const nsACString &spec, + const char *charset, nsIURI *baseURI); + nsresult SetDefaultPort(int32_t aNewDefaultPort); + int32_t Port() { return mPort == -1 ? mDefaultPort : mPort; } void ReplacePortInSpec(int32_t aNewPort);