Backing out bug 389188 due to potential private bytes increase on talos

This commit is contained in:
dtownsend@oxymoronical.com 2007-09-25 21:30:17 -07:00
Родитель ba8c534cf5
Коммит 01eb76936f
6 изменённых файлов: 1 добавлений и 54 удалений

Просмотреть файл

@ -58,9 +58,6 @@ REQUIRES = xpcom \
necko \
nkcache \
gfx \
caps \
xpconnect \
js \
$(JPEG_REQUIRES) \
$(PNG_REQUIRES) \
$(ZLIB_REQUIRES) \

Просмотреть файл

@ -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;
};

Просмотреть файл

@ -56,9 +56,6 @@ REQUIRES = xpcom \
gfx \
thebes \
cairo \
caps \
xpconnect \
js \
$(NULL)
CPPSRCS = \

Просмотреть файл

@ -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<nsIChannel> chan(do_QueryInterface(aRequest));
if (chan) {
nsCOMPtr<nsIScriptSecurityManager> 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) {

Просмотреть файл

@ -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<nsIRequest> mRequest;
nsCOMPtr<nsIURI> mURI;
nsCOMPtr<nsIPrincipal> mPrincipal;
nsCOMPtr<imgIContainer> mImage;
nsCOMPtr<imgIDecoder> mDecoder;
nsCOMPtr<nsIProperties> mProperties;

Просмотреть файл

@ -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)