Bug 1432257 - Remove nsIStandardURL setter methods r=mayhemer

* Removes nsIStandardURL.{init,setDefaultPort} as these have been migrated to nsIStandardURLMutator

MozReview-Commit-ID: 7JPZmyEr65h

--HG--
extra : rebase_source : 5c40f1ff8eff0f73b54fb148923bab7b8b2270a7
This commit is contained in:
Valentin Gosu 2018-01-22 20:20:18 +01:00
parent eea7e5e494
commit 2cf8889195
3 changed files with 6 additions and 10 deletions

View File

@ -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)]

View File

@ -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();

View File

@ -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);