зеркало из https://github.com/mozilla/pjs.git
Bug 254586 don't assume cacheToken can be qi'd to nsICacheEntryDescriptor
r=bzbarsky sr=darin
This commit is contained in:
Родитель
90e271dce1
Коммит
23a47001f9
|
@ -121,7 +121,7 @@
|
||||||
#include "nsPIDOMWindow.h"
|
#include "nsPIDOMWindow.h"
|
||||||
#include "nsIDOMDocument.h"
|
#include "nsIDOMDocument.h"
|
||||||
#include "nsICachingChannel.h"
|
#include "nsICachingChannel.h"
|
||||||
#include "nsICacheEntryDescriptor.h"
|
#include "nsICacheVisitor.h"
|
||||||
#include "nsIMultiPartChannel.h"
|
#include "nsIMultiPartChannel.h"
|
||||||
#include "nsIWyciwygChannel.h"
|
#include "nsIWyciwygChannel.h"
|
||||||
|
|
||||||
|
@ -6372,7 +6372,7 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI,
|
||||||
}
|
}
|
||||||
if (cacheToken) {
|
if (cacheToken) {
|
||||||
// Check if the page has expired from cache
|
// Check if the page has expired from cache
|
||||||
nsCOMPtr<nsICacheEntryDescriptor> cacheEntryInfo(do_QueryInterface(cacheToken));
|
nsCOMPtr<nsICacheEntryInfo> cacheEntryInfo(do_QueryInterface(cacheToken));
|
||||||
if (cacheEntryInfo) {
|
if (cacheEntryInfo) {
|
||||||
PRUint32 expTime;
|
PRUint32 expTime;
|
||||||
cacheEntryInfo->GetExpirationTime(&expTime);
|
cacheEntryInfo->GetExpirationTime(&expTime);
|
||||||
|
|
|
@ -628,7 +628,7 @@ NS_IMETHODIMP imgRequest::OnStartRequest(nsIRequest *aRequest, nsISupports *ctxt
|
||||||
nsCOMPtr<nsISupports> cacheToken;
|
nsCOMPtr<nsISupports> cacheToken;
|
||||||
cacheChannel->GetCacheToken(getter_AddRefs(cacheToken));
|
cacheChannel->GetCacheToken(getter_AddRefs(cacheToken));
|
||||||
if (cacheToken) {
|
if (cacheToken) {
|
||||||
nsCOMPtr<nsICacheEntryDescriptor> entryDesc(do_QueryInterface(cacheToken));
|
nsCOMPtr<nsICacheEntryInfo> entryDesc(do_QueryInterface(cacheToken));
|
||||||
if (entryDesc) {
|
if (entryDesc) {
|
||||||
PRUint32 expiration;
|
PRUint32 expiration;
|
||||||
/* get the expiration time from the caching channel's token */
|
/* get the expiration time from the caching channel's token */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче