From ce60f37a8acbd9805ed058fe710cbce0696371e4 Mon Sep 17 00:00:00 2001 From: "dtownsend@oxymoronical.com" Date: Tue, 25 Sep 2007 21:30:17 -0700 Subject: [PATCH] Backing out bug 389188 due to potential private bytes increase on talos --- modules/libpr0n/build/Makefile.in | 3 --- modules/libpr0n/public/imgIRequest.idl | 13 +------------ modules/libpr0n/src/Makefile.in | 3 --- modules/libpr0n/src/imgRequest.cpp | 24 ------------------------ modules/libpr0n/src/imgRequest.h | 3 --- modules/libpr0n/src/imgRequestProxy.cpp | 9 --------- 6 files changed, 1 insertion(+), 54 deletions(-) diff --git a/modules/libpr0n/build/Makefile.in b/modules/libpr0n/build/Makefile.in index eec0fcf5ccd..4a851f2c7bf 100644 --- a/modules/libpr0n/build/Makefile.in +++ b/modules/libpr0n/build/Makefile.in @@ -58,9 +58,6 @@ REQUIRES = xpcom \ necko \ nkcache \ gfx \ - caps \ - xpconnect \ - js \ $(JPEG_REQUIRES) \ $(PNG_REQUIRES) \ $(ZLIB_REQUIRES) \ diff --git a/modules/libpr0n/public/imgIRequest.idl b/modules/libpr0n/public/imgIRequest.idl index 11b32a02e46..d9e053f6525 100644 --- a/modules/libpr0n/public/imgIRequest.idl +++ b/modules/libpr0n/public/imgIRequest.idl @@ -43,7 +43,6 @@ interface imgIContainer; interface imgIDecoderObserver; interface nsIURI; -interface nsIPrincipal; /** * imgIRequest interface @@ -52,7 +51,7 @@ interface nsIPrincipal; * @version 0.1 * @see imagelib2 */ -[scriptable, uuid(a297d3fa-5e0c-4e59-9f30-a01c9d4f3f8b)] +[scriptable, uuid(ccf705f6-1dd1-11b2-82ef-e18eccf7f7ec)] interface imgIRequest : nsIRequest { /** @@ -81,11 +80,6 @@ interface imgIRequest : nsIRequest */ readonly attribute unsigned long imageStatus; - /** - * The URI the image load was started with. Note that this might not be the - * actual URI for the image (e.g. if HTTP redirects happened during the - * load). - */ readonly attribute nsIURI URI; readonly attribute imgIDecoderObserver decoderObserver; @@ -99,10 +93,5 @@ interface imgIRequest : nsIRequest * for this image load. */ imgIRequest clone(in imgIDecoderObserver aObserver); - - /** - * The principal gotten from the channel the image was loaded from. - */ - readonly attribute nsIPrincipal imagePrincipal; }; diff --git a/modules/libpr0n/src/Makefile.in b/modules/libpr0n/src/Makefile.in index 2f85dbff435..5db38f8088b 100644 --- a/modules/libpr0n/src/Makefile.in +++ b/modules/libpr0n/src/Makefile.in @@ -56,9 +56,6 @@ REQUIRES = xpcom \ gfx \ thebes \ cairo \ - caps \ - xpconnect \ - js \ $(NULL) CPPSRCS = \ diff --git a/modules/libpr0n/src/imgRequest.cpp b/modules/libpr0n/src/imgRequest.cpp index 1b2f406e62c..3e267150c0d 100644 --- a/modules/libpr0n/src/imgRequest.cpp +++ b/modules/libpr0n/src/imgRequest.cpp @@ -61,7 +61,6 @@ #include "nsIProxyObjectManager.h" #include "nsIServiceManager.h" #include "nsISupportsPrimitives.h" -#include "nsIScriptSecurityManager.h" #include "nsString.h" #include "nsXPIDLString.h" @@ -308,17 +307,6 @@ nsresult imgRequest::GetURI(nsIURI **aURI) return NS_ERROR_FAILURE; } -nsresult imgRequest::GetPrincipal(nsIPrincipal **aPrincipal) -{ - LOG_FUNC(gImgLog, "imgRequest::GetPrincipal"); - - if (mPrincipal) { - NS_ADDREF(*aPrincipal = mPrincipal); - } - - return NS_ERROR_FAILURE; -} - void imgRequest::RemoveFromCache() { LOG_SCOPE(gImgLog, "imgRequest::RemoveFromCache"); @@ -611,19 +599,7 @@ NS_IMETHODIMP imgRequest::OnStartRequest(nsIRequest *aRequest, nsISupports *ctxt proxy->OnStartRequest(aRequest, ctxt); } - /* Get our principal */ nsCOMPtr chan(do_QueryInterface(aRequest)); - if (chan) { - nsCOMPtr secMan = - do_GetService("@mozilla.org/scriptsecuritymanager;1"); - if (secMan) { - nsresult rv = secMan->GetChannelPrincipal(chan, - getter_AddRefs(mPrincipal)); - if (NS_FAILED(rv)) { - return rv; - } - } - } /* get the expires info */ if (mCacheEntry) { diff --git a/modules/libpr0n/src/imgRequest.h b/modules/libpr0n/src/imgRequest.h index 67fbf833d17..3de9607f59d 100644 --- a/modules/libpr0n/src/imgRequest.h +++ b/modules/libpr0n/src/imgRequest.h @@ -52,7 +52,6 @@ #include "nsIProperties.h" #include "nsIStreamListener.h" #include "nsIURI.h" -#include "nsIPrincipal.h" #include "nsCategoryCache.h" #include "nsCOMPtr.h" @@ -122,7 +121,6 @@ private: inline nsresult GetResultFromImageStatus(PRUint32 aStatus) const; void Cancel(nsresult aStatus); nsresult GetURI(nsIURI **aURI); - nsresult GetPrincipal(nsIPrincipal **aPrincipal); void RemoveFromCache(); inline const char *GetMimeType() const { return mContentType.get(); @@ -153,7 +151,6 @@ public: private: nsCOMPtr mRequest; nsCOMPtr mURI; - nsCOMPtr mPrincipal; nsCOMPtr mImage; nsCOMPtr mDecoder; nsCOMPtr mProperties; diff --git a/modules/libpr0n/src/imgRequestProxy.cpp b/modules/libpr0n/src/imgRequestProxy.cpp index 23e93ac4a51..f960a28f736 100644 --- a/modules/libpr0n/src/imgRequestProxy.cpp +++ b/modules/libpr0n/src/imgRequestProxy.cpp @@ -342,15 +342,6 @@ NS_IMETHODIMP imgRequestProxy::Clone(imgIDecoderObserver* aObserver, return NS_OK; } -/* readonly attribute nsIPrincipal imagePrincipal; */ -NS_IMETHODIMP imgRequestProxy::GetImagePrincipal(nsIPrincipal **aPrincipal) -{ - if (!mOwner) - return NS_ERROR_FAILURE; - - return mOwner->GetPrincipal(aPrincipal); -} - /** nsISupportsPriority methods **/ NS_IMETHODIMP imgRequestProxy::GetPriority(PRInt32 *priority)