Bug 1472087 - Remove nsDocShell::CreateLoadInfo; r=nika draft
authorKyle Machulis <kyle@nonpolynomial.com>
Fri, 29 Jun 2018 17:27:20 -0700
changeset 817132 5efdf274d8807894d0092a79048c2d5e5eaa962a
parent 817131 99e91a0d320aaad67b347d18440535f90af223a6
child 817133 f5532096e2be5ee2b00fe8da817ffbccdb68fb33
child 817136 a60cfe83f03ff1c176180bff788a1892ba9c8acc
push id115962
push userbmo:kyle@nonpolynomial.com
push dateThu, 12 Jul 2018 02:41:52 +0000
reviewersnika
bugs1472087
milestone63.0a1
Bug 1472087 - Remove nsDocShell::CreateLoadInfo; r=nika We can now just call new nsDocShellLoadInfo instead of worrying about xpcom fallibility. MozReview-Commit-ID: 80tHtBji1Vm
docshell/base/nsDocShell.cpp
docshell/base/nsIDocShell.idl
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1019,26 +1019,16 @@ nsDocShell::LoadURI(nsIURI* aURI,
                       aFirstParty,
                       srcdoc,
                       sourceDocShell,
                       baseURI,
                       nullptr,  // No nsIDocShell
                       nullptr); // No nsIRequest
 }
 
-NS_IMETHODIMP
-nsDocShell::CreateLoadInfo(nsDocShellLoadInfo** aLoadInfo)
-{
-  nsDocShellLoadInfo* loadInfo = new nsDocShellLoadInfo();
-  RefPtr<nsDocShellLoadInfo> localRef(loadInfo);
-
-  localRef.forget(aLoadInfo);
-  return NS_OK;
-}
-
 /*
  * Reset state to a new content model within the current document and the
  * document viewer. Called by the document before initiating an out of band
  * document.write().
  */
 NS_IMETHODIMP
 nsDocShell::PrepareForNewContentModel()
 {
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -204,22 +204,16 @@ interface nsIDocShell : nsIDocShellTreeI
    * Do either a history.pushState() or history.replaceState() operation,
    * depending on the value of aReplace.
    */
   [implicit_jscontext]
   void addState(in jsval aData, in DOMString aTitle,
                 in DOMString aURL, in boolean aReplace);
 
   /**
-   * Creates a DocShellLoadInfo object that you can manipulate and then pass
-   * to loadURI.
-   */
-  void createLoadInfo(out nsDocShellLoadInfoPtr loadInfo);
-
-  /**
    * Reset state to a new content model within the current document and the document
    * viewer.  Called by the document before initiating an out of band document.write().
    */
   void prepareForNewContentModel();
 
   /**
    * For editors and suchlike who wish to change the URI associated with the
    * document. Note if you want to get the current URI, use the read-only