Bug 1430237 - remove newSimpleNestedURI from nsINetUtil, r=mayhemer
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 15 Jan 2018 11:51:24 +0000
changeset 451091 d282f520d2e3a72b61740fe0d4e01b8151eead54
parent 451090 9865d21055082ef4290f470423c2c73fd793ab17
child 451092 cdae594745cdb4a77cae7bae4e662af3212f2a79
push id8543
push userryanvm@gmail.com
push dateTue, 16 Jan 2018 14:33:22 +0000
treeherdermozilla-beta@a6525ed16a32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1430237
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1430237 - remove newSimpleNestedURI from nsINetUtil, r=mayhemer MozReview-Commit-ID: 74RsNo60Kfh
netwerk/base/nsINetUtil.idl
netwerk/base/nsIOService.cpp
--- a/netwerk/base/nsINetUtil.idl
+++ b/netwerk/base/nsINetUtil.idl
@@ -78,23 +78,16 @@ interface nsINetUtil : nsISupports
   /**
    * Take aURI and produce an immutable version of it for the caller.  If aURI
    * is immutable this will be aURI itself; otherwise this will be a clone,
    * marked immutable if possible.  Passing null to this method is allowed; in
    * that case it will return null.
    */
   nsIURI toImmutableURI(in nsIURI aURI);
 
-  /**
-   * Create a simple nested URI using the result of
-   * toImmutableURI on the passed-in aURI which may not be null.
-   * Note: The return URI will not have had its spec set yet.
-   */
-  nsIURI newSimpleNestedURI(in nsIURI aURI);
-
   /** Escape every character with its %XX-escaped equivalent */
   const unsigned long ESCAPE_ALL = 0;
 
   /** Leave alphanumeric characters intact and %XX-escape all others */
   const unsigned long ESCAPE_XALPHAS = 1;
 
   /** Leave alphanumeric characters intact, convert spaces to '+',
       %XX-escape all others */
--- a/netwerk/base/nsIOService.cpp
+++ b/netwerk/base/nsIOService.cpp
@@ -1570,29 +1570,16 @@ nsIOService::ToImmutableURI(nsIURI* uri,
     nsresult rv = NS_EnsureSafeToReturn(uri, result);
     NS_ENSURE_SUCCESS(rv, rv);
 
     NS_TryToSetImmutable(*result);
     return NS_OK;
 }
 
 NS_IMETHODIMP
-nsIOService::NewSimpleNestedURI(nsIURI* aURI, nsIURI** aResult)
-{
-    NS_ENSURE_ARG(aURI);
-
-    nsCOMPtr<nsIURI> safeURI;
-    nsresult rv = NS_EnsureSafeToReturn(aURI, getter_AddRefs(safeURI));
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI));
-    return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
-}
-
-NS_IMETHODIMP
 nsIOService::SetManageOfflineStatus(bool aManage)
 {
     LOG(("nsIOService::SetManageOfflineStatus aManage=%d\n", aManage));
     mManageLinkStatus = aManage;
 
     // When detection is not activated, the default connectivity state is true.
     if (!mManageLinkStatus) {
         SetConnectivityInternal(true);