mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-02-07 09:31:28 +00:00
fix an assert M1416774
This commit is contained in:
parent
3926185105
commit
c9ed275af7
@ -2757,6 +2757,12 @@ imgCacheValidator::AddProxy(imgRequestProxy* aProxy)
|
|||||||
mProxies.AppendObject(aProxy);
|
mProxies.AppendObject(aProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
imgCacheValidator::RemoveProxy(imgRequestProxy* aProxy)
|
||||||
|
{
|
||||||
|
mProxies.RemoveObject(aProxy);
|
||||||
|
}
|
||||||
|
|
||||||
/** nsIRequestObserver methods **/
|
/** nsIRequestObserver methods **/
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -529,6 +529,7 @@ public:
|
|||||||
bool forcePrincipalCheckForCacheEntry);
|
bool forcePrincipalCheckForCacheEntry);
|
||||||
|
|
||||||
void AddProxy(imgRequestProxy* aProxy);
|
void AddProxy(imgRequestProxy* aProxy);
|
||||||
|
void RemoveProxy(imgRequestProxy* aProxy);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||||
|
@ -338,14 +338,20 @@ imgRequestProxy::CancelAndForgetObserver(nsresult aStatus)
|
|||||||
|
|
||||||
mCanceled = true;
|
mCanceled = true;
|
||||||
|
|
||||||
|
imgRequest* owner = GetOwner();
|
||||||
|
if (owner) {
|
||||||
|
imgCacheValidator* validator = owner->GetValidator();
|
||||||
|
if (validator) {
|
||||||
|
validator->RemoveProxy(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
owner->RemoveProxy(this, aStatus);
|
||||||
|
}
|
||||||
|
|
||||||
// Now cheat and make sure our removal from loadgroup happens async
|
// Now cheat and make sure our removal from loadgroup happens async
|
||||||
bool oldIsInLoadGroup = mIsInLoadGroup;
|
bool oldIsInLoadGroup = mIsInLoadGroup;
|
||||||
mIsInLoadGroup = false;
|
mIsInLoadGroup = false;
|
||||||
|
|
||||||
if (GetOwner()) {
|
|
||||||
GetOwner()->RemoveProxy(this, aStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
mIsInLoadGroup = oldIsInLoadGroup;
|
mIsInLoadGroup = oldIsInLoadGroup;
|
||||||
|
|
||||||
if (mIsInLoadGroup) {
|
if (mIsInLoadGroup) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user