Bug 1453869 part 2. Get rid of the unused nsIDOMParser::Init method. r=mrbkap
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 20 Apr 2018 23:01:24 -0400
changeset 468452 5576b25f547b61d27ac42c3bdba683a013a57d72
parent 468451 2bf23b953d5bbb0f3b7dc440906a50955fc429f8
child 468453 8d5d3b66c5d4a99d45e983e23a7f743f163c29b4
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1453869
milestone61.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 1453869 part 2. Get rid of the unused nsIDOMParser::Init method. r=mrbkap MozReview-Commit-ID: B3HVscqYE6G
dom/base/DOMParser.cpp
dom/base/DOMParser.h
dom/base/nsIDOMParser.idl
--- a/dom/base/DOMParser.cpp
+++ b/dom/base/DOMParser.cpp
@@ -299,17 +299,17 @@ DOMParser::ParseFromStream(nsIInputStrea
     return NS_ERROR_FAILURE;
   }
 
   domDocument.swap(*aResult);
 
   return NS_OK;
 }
 
-NS_IMETHODIMP
+nsresult
 DOMParser::Init(nsIPrincipal* principal, nsIURI* documentURI,
                 nsIURI* baseURI, nsIGlobalObject* aScriptObject)
 {
   NS_ENSURE_STATE(!mAttemptedInit);
   mAttemptedInit = true;
   NS_ENSURE_ARG(principal || documentURI);
   mDocumentURI = documentURI;
 
--- a/dom/base/DOMParser.h
+++ b/dom/base/DOMParser.h
@@ -80,16 +80,41 @@ private:
   explicit DOMParser(nsISupports* aOwner)
     : mOwner(aOwner)
     , mAttemptedInit(false)
     , mOriginalPrincipalWasSystem(false)
   {
     MOZ_ASSERT(aOwner);
   }
 
+  /**
+   * Initialize the principal and document and base URIs that the parser should
+   * use for documents it creates.  If this is not called, then a null
+   * principal and its URI will be used.  When creating a DOMParser via the JS
+   * constructor, this will be called automatically.  This method may only be
+   * called once.  If this method fails, all following parse attempts will
+   * fail.
+   *
+   * @param principal The principal to use for documents we create.
+   *                  If this is null, a codebase principal will be created
+   *                  based on documentURI; in that case the documentURI must
+   *                  be non-null.
+   * @param documentURI The documentURI to use for the documents we create.
+   *                    If null, the principal's URI will be used;
+   *                    in that case, the principal must be non-null and its
+   *                    URI must be non-null.
+   * @param baseURI The baseURI to use for the documents we create.
+   *                If null, the documentURI will be used.
+   * @param scriptObject The object from which the context for event handling
+   *                     can be got.
+   */
+  nsresult Init(nsIPrincipal* aPrincipal, nsIURI* aDocumentURI,
+                nsIURI* aBaseURI, nsIGlobalObject* aSriptObjet);
+
+
   nsresult InitInternal(nsISupports* aOwner, nsIPrincipal* prin,
                         nsIURI* documentURI, nsIURI* baseURI);
 
   nsresult SetUpDocument(DocumentFlavor aFlavor, nsIDOMDocument** aResult);
 
   // Helper for ParseFromString
   nsresult ParseFromString(const nsAString& str, const char *contentType,
                            nsIDOMDocument **aResult);
--- a/dom/base/nsIDOMParser.idl
+++ b/dom/base/nsIDOMParser.idl
@@ -59,42 +59,16 @@ interface nsIDOMParser : nsISupports
    *                    Must not be NULL.
    * @returns The DOM document created as a result of parsing the 
    *          stream
    */
   nsIDOMDocument parseFromStream(in nsIInputStream stream, 
                                  in string charset,
                                  in long contentLength,
                                  in string contentType);
-
-  /**
-   * Initialize the principal and document and base URIs that the parser should
-   * use for documents it creates.  If this is not called, then a null
-   * principal and its URI will be used.  When creating a DOMParser via the JS
-   * constructor, this will be called automatically.  This method may only be
-   * called once.  If this method fails, all following parse attempts will
-   * fail.
-   *
-   * @param principal The principal to use for documents we create.
-   *                  If this is null, a codebase principal will be created
-   *                  based on documentURI; in that case the documentURI must
-   *                  be non-null.
-   * @param documentURI The documentURI to use for the documents we create.
-   *                    If null, the principal's URI will be used;
-   *                    in that case, the principal must be non-null and its
-   *                    URI must be non-null.
-   * @param baseURI The baseURI to use for the documents we create.
-   *                If null, the documentURI will be used.
-   * @param scriptObject The object from which the context for event handling
-   *                     can be got.
-   */
-  [noscript] void init(in nsIPrincipal principal,
-                       in nsIURI documentURI,
-                       in nsIURI baseURI,
-                       in nsIGlobalObject scriptObject);
 };
 
 %{ C++
 #define NS_DOMPARSER_CID                            \
  { /* 3a8a3a50-512c-11d4-9a54-000064657374 */       \
    0x3a8a3a50, 0x512c, 0x11d4,                      \
   {0x9a, 0x54, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74} }
 #define NS_DOMPARSER_CONTRACTID \