mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 803125 - Notify status tracker when image request is destroyed. r=joe
This commit is contained in:
parent
aa68b3314a
commit
440d2df25e
@ -108,6 +108,9 @@ imgRequest::imgRequest(imgLoader* aLoader)
|
||||
|
||||
imgRequest::~imgRequest()
|
||||
{
|
||||
// The status tracker can outlive this request, and needs to know it's dying.
|
||||
GetStatusTracker().ClearRequest();
|
||||
|
||||
if (mURI) {
|
||||
nsAutoCString spec;
|
||||
mURI->GetSpec(spec);
|
||||
|
@ -766,3 +766,9 @@ imgStatusTracker::MaybeUnblockOnload()
|
||||
SendUnblockOnload(iter.GetNext());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
imgStatusTracker::ClearRequest()
|
||||
{
|
||||
mRequest = nullptr;
|
||||
}
|
||||
|
@ -186,6 +186,9 @@ public:
|
||||
|
||||
void MaybeUnblockOnload();
|
||||
|
||||
// Null out any reference to an associated image request
|
||||
void ClearRequest();
|
||||
|
||||
// Weak pointer getters - no AddRefs.
|
||||
inline mozilla::image::Image* GetImage() const { return mImage; };
|
||||
inline imgRequest* GetRequest() const { return mRequest; };
|
||||
|
Loading…
Reference in New Issue
Block a user