mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-11-19 02:13:04 +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);
|
||||
}
|
||||
|
||||
void
|
||||
imgCacheValidator::RemoveProxy(imgRequestProxy* aProxy)
|
||||
{
|
||||
mProxies.RemoveObject(aProxy);
|
||||
}
|
||||
|
||||
/** nsIRequestObserver methods **/
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -529,6 +529,7 @@ public:
|
||||
bool forcePrincipalCheckForCacheEntry);
|
||||
|
||||
void AddProxy(imgRequestProxy* aProxy);
|
||||
void RemoveProxy(imgRequestProxy* aProxy);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
|
@ -338,14 +338,20 @@ imgRequestProxy::CancelAndForgetObserver(nsresult aStatus)
|
||||
|
||||
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
|
||||
bool oldIsInLoadGroup = mIsInLoadGroup;
|
||||
mIsInLoadGroup = false;
|
||||
|
||||
if (GetOwner()) {
|
||||
GetOwner()->RemoveProxy(this, aStatus);
|
||||
}
|
||||
|
||||
mIsInLoadGroup = oldIsInLoadGroup;
|
||||
|
||||
if (mIsInLoadGroup) {
|
||||
|
Loading…
Reference in New Issue
Block a user