Bug 1307467 - Remove mAppURI from nsJARChannel r=bagder
authorValentin Gosu <valentin.gosu@gmail.com>
Fri, 21 Oct 2016 00:24:04 +0200
changeset 363127 7d4b390b36e836ac03824e5279e17ffeac4107d9
parent 363126 4b76a90d5cafb31b6c9a03a4f93c50608626c26d
child 363128 27157986b0bef62815cb23d5abdb6630968f33dc
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbagder
bugs1307467
milestone52.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 1307467 - Remove mAppURI from nsJARChannel r=bagder MozReview-Commit-ID: CX9TMxY1qZM
modules/libjar/nsIJARChannel.idl
modules/libjar/nsJARChannel.cpp
modules/libjar/nsJARChannel.h
--- a/modules/libjar/nsIJARChannel.idl
+++ b/modules/libjar/nsIJARChannel.idl
@@ -15,21 +15,16 @@ interface nsIJARChannel : nsIChannel
      * Returns TRUE if the JAR file is not safe (if the content type reported
      * by the server for a remote JAR is not of an expected type).  Scripting,
      * redirects, and plugins should be disabled when loading from this
      * channel.
      */
     [infallible] readonly attribute boolean isUnsafe;
 
     /**
-     * Forces the uri to be a app:// uri.
-     */
-    void setAppURI(in nsIURI uri);
-
-    /**
      * Returns the JAR file.  May be null if the jar is remote.
      */
     readonly attribute nsIFile jarFile;
 
     /**
      * Returns the zip entry if the file is synchronously accessible.
      * This will work even without opening the channel.
      */
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -188,17 +188,16 @@ nsJARInputThunk::IsNonBlocking(bool *non
 
 //-----------------------------------------------------------------------------
 // nsJARChannel
 //-----------------------------------------------------------------------------
 
 
 nsJARChannel::nsJARChannel()
     : mOpened(false)
-    , mAppURI(nullptr)
     , mContentDisposition(0)
     , mContentLength(-1)
     , mLoadFlags(LOAD_NORMAL)
     , mStatus(NS_OK)
     , mIsPending(false)
     , mIsUnsafe(true)
     , mBlockRemoteFiles(false)
 {
@@ -518,21 +517,17 @@ nsJARChannel::SetOriginalURI(nsIURI *aUR
     NS_ENSURE_ARG_POINTER(aURI);
     mOriginalURI = aURI;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsJARChannel::GetURI(nsIURI **aURI)
 {
-    if (mAppURI) {
-        NS_IF_ADDREF(*aURI = mAppURI);
-    } else {
-        NS_IF_ADDREF(*aURI = mJarURI);
-    }
+    NS_IF_ADDREF(*aURI = mJarURI);
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsJARChannel::GetOwner(nsISupports **aOwner)
 {
     // JAR signatures are not processed to avoid main-thread network I/O (bug 726125)
@@ -859,30 +854,16 @@ nsJARChannel::AsyncOpen2(nsIStreamListen
 NS_IMETHODIMP
 nsJARChannel::GetIsUnsafe(bool *isUnsafe)
 {
     *isUnsafe = mIsUnsafe;
     return NS_OK;
 }
 
 NS_IMETHODIMP
-nsJARChannel::SetAppURI(nsIURI *aURI) {
-    NS_ENSURE_ARG_POINTER(aURI);
-
-    nsAutoCString scheme;
-    aURI->GetScheme(scheme);
-    if (!scheme.EqualsLiteral("app")) {
-        return NS_ERROR_INVALID_ARG;
-    }
-
-    mAppURI = aURI;
-    return NS_OK;
-}
-
-NS_IMETHODIMP
 nsJARChannel::GetJarFile(nsIFile **aFile)
 {
     NS_IF_ADDREF(*aFile = mJarFile);
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsJARChannel::GetZipEntry(nsIZipEntry **aZipEntry)
--- a/modules/libjar/nsJARChannel.h
+++ b/modules/libjar/nsJARChannel.h
@@ -67,17 +67,16 @@ private:
         override;
 
     nsCString                       mSpec;
 
     bool                            mOpened;
 
     nsCOMPtr<nsIJARURI>             mJarURI;
     nsCOMPtr<nsIURI>                mOriginalURI;
-    nsCOMPtr<nsIURI>                mAppURI;
     nsCOMPtr<nsISupports>           mOwner;
     nsCOMPtr<nsILoadInfo>           mLoadInfo;
     nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
     nsCOMPtr<nsISupports>           mSecurityInfo;
     nsCOMPtr<nsIProgressEventSink>  mProgressSink;
     nsCOMPtr<nsILoadGroup>          mLoadGroup;
     nsCOMPtr<nsIStreamListener>     mListener;
     nsCOMPtr<nsISupports>           mListenerContext;