зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 75709d46ba3b (bug 1137037)
This commit is contained in:
Родитель
48668314ac
Коммит
2c63c17f19
|
@ -28,6 +28,7 @@
|
||||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||||
#include "nsIFileURL.h"
|
#include "nsIFileURL.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
|
#include "nsIDocument.h"
|
||||||
#include "nsINetworkPredictor.h"
|
#include "nsINetworkPredictor.h"
|
||||||
|
|
||||||
#include "nsIApplicationCache.h"
|
#include "nsIApplicationCache.h"
|
||||||
|
@ -2045,6 +2046,12 @@ nsresult imgLoader::LoadImage(nsIURI *aURI,
|
||||||
timedChannel->SetInitiatorType(initiatorType);
|
timedChannel->SetInitiatorType(initiatorType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pass the inner window ID of the loading document, if possible.
|
||||||
|
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aCX);
|
||||||
|
if (doc) {
|
||||||
|
request->SetInnerWindowID(doc->InnerWindowID());
|
||||||
|
}
|
||||||
|
|
||||||
// create the proxy listener
|
// create the proxy listener
|
||||||
nsCOMPtr<nsIStreamListener> pl = new ProxyListener(request.get());
|
nsCOMPtr<nsIStreamListener> pl = new ProxyListener(request.get());
|
||||||
|
|
||||||
|
@ -2508,8 +2515,7 @@ NS_IMPL_ISUPPORTS(imgCacheValidator, nsIStreamListener, nsIRequestObserver,
|
||||||
|
|
||||||
imgCacheValidator::imgCacheValidator(nsProgressNotificationProxy* progress,
|
imgCacheValidator::imgCacheValidator(nsProgressNotificationProxy* progress,
|
||||||
imgLoader* loader, imgRequest *request,
|
imgLoader* loader, imgRequest *request,
|
||||||
nsISupports* aContext,
|
void *aContext, bool forcePrincipalCheckForCacheEntry)
|
||||||
bool forcePrincipalCheckForCacheEntry)
|
|
||||||
: mProgressProxy(progress),
|
: mProgressProxy(progress),
|
||||||
mRequest(request),
|
mRequest(request),
|
||||||
mContext(aContext),
|
mContext(aContext),
|
||||||
|
|
|
@ -497,8 +497,7 @@ class imgCacheValidator : public nsIStreamListener,
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
imgCacheValidator(nsProgressNotificationProxy* progress, imgLoader* loader,
|
imgCacheValidator(nsProgressNotificationProxy* progress, imgLoader* loader,
|
||||||
imgRequest* aRequest, nsISupports* aContext,
|
imgRequest *request, void *aContext, bool forcePrincipalCheckForCacheEntry);
|
||||||
bool forcePrincipalCheckForCacheEntry);
|
|
||||||
|
|
||||||
void AddProxy(imgRequestProxy *aProxy);
|
void AddProxy(imgRequestProxy *aProxy);
|
||||||
|
|
||||||
|
@ -524,7 +523,7 @@ private:
|
||||||
nsRefPtr<imgRequest> mNewRequest;
|
nsRefPtr<imgRequest> mNewRequest;
|
||||||
nsRefPtr<imgCacheEntry> mNewEntry;
|
nsRefPtr<imgCacheEntry> mNewEntry;
|
||||||
|
|
||||||
nsCOMPtr<nsISupports> mContext;
|
void *mContext;
|
||||||
|
|
||||||
imgLoader* mImgLoader;
|
imgLoader* mImgLoader;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
|
|
||||||
#include "nsIChannel.h"
|
#include "nsIChannel.h"
|
||||||
#include "nsICachingChannel.h"
|
#include "nsICachingChannel.h"
|
||||||
#include "nsIDocument.h"
|
|
||||||
#include "nsIThreadRetargetableRequest.h"
|
#include "nsIThreadRetargetableRequest.h"
|
||||||
#include "nsIInputStream.h"
|
#include "nsIInputStream.h"
|
||||||
#include "nsIMultiPartChannel.h"
|
#include "nsIMultiPartChannel.h"
|
||||||
|
@ -96,7 +95,7 @@ nsresult imgRequest::Init(nsIURI *aURI,
|
||||||
nsIRequest *aRequest,
|
nsIRequest *aRequest,
|
||||||
nsIChannel *aChannel,
|
nsIChannel *aChannel,
|
||||||
imgCacheEntry *aCacheEntry,
|
imgCacheEntry *aCacheEntry,
|
||||||
nsISupports* aCX,
|
void *aLoadId,
|
||||||
nsIPrincipal* aLoadingPrincipal,
|
nsIPrincipal* aLoadingPrincipal,
|
||||||
int32_t aCORSMode,
|
int32_t aCORSMode,
|
||||||
ReferrerPolicy aReferrerPolicy)
|
ReferrerPolicy aReferrerPolicy)
|
||||||
|
@ -133,13 +132,7 @@ nsresult imgRequest::Init(nsIURI *aURI,
|
||||||
|
|
||||||
mCacheEntry = aCacheEntry;
|
mCacheEntry = aCacheEntry;
|
||||||
|
|
||||||
SetLoadId(aCX);
|
SetLoadId(aLoadId);
|
||||||
|
|
||||||
// Grab the inner window ID of the loading document, if possible.
|
|
||||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aCX);
|
|
||||||
if (doc) {
|
|
||||||
mInnerWindowId = doc->InnerWindowID();
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
nsIRequest *aRequest,
|
nsIRequest *aRequest,
|
||||||
nsIChannel *aChannel,
|
nsIChannel *aChannel,
|
||||||
imgCacheEntry *aCacheEntry,
|
imgCacheEntry *aCacheEntry,
|
||||||
nsISupports* aCX,
|
void *aLoadId,
|
||||||
nsIPrincipal* aLoadingPrincipal,
|
nsIPrincipal* aLoadingPrincipal,
|
||||||
int32_t aCORSMode,
|
int32_t aCORSMode,
|
||||||
ReferrerPolicy aReferrerPolicy);
|
ReferrerPolicy aReferrerPolicy);
|
||||||
|
@ -91,6 +91,10 @@ public:
|
||||||
// Request that we start decoding the image as soon as data becomes available.
|
// Request that we start decoding the image as soon as data becomes available.
|
||||||
void RequestDecode() { mDecodeRequested = true; }
|
void RequestDecode() { mDecodeRequested = true; }
|
||||||
|
|
||||||
|
inline void SetInnerWindowID(uint64_t aInnerWindowId) {
|
||||||
|
mInnerWindowId = aInnerWindowId;
|
||||||
|
}
|
||||||
|
|
||||||
inline uint64_t InnerWindowID() const {
|
inline uint64_t InnerWindowID() const {
|
||||||
return mInnerWindowId;
|
return mInnerWindowId;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче