зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1746313: Image cleanup r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133982
This commit is contained in:
Родитель
5bfe4425ee
Коммит
7840dcdbd7
|
@ -91,6 +91,8 @@ nsresult imgRequest::Init(nsIURI* aURI, nsIURI* aFinalURI,
|
|||
mozilla::CORSMode aCORSMode,
|
||||
nsIReferrerInfo* aReferrerInfo) {
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Cannot use nsIURI off main thread!");
|
||||
// Init() can only be called once, and that's before it can be used off
|
||||
// mainthread
|
||||
|
||||
LOG_FUNC(gImgLog, "imgRequest::Init");
|
||||
|
||||
|
@ -693,7 +695,14 @@ imgRequest::OnStopRequest(nsIRequest* aRequest, nsresult status) {
|
|||
|
||||
RefPtr<imgRequest> strongThis = this;
|
||||
|
||||
if (mIsMultiPartChannel && mNewPartPending) {
|
||||
bool isMultipart = false;
|
||||
bool newPartPending = false;
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
isMultipart = mIsMultiPartChannel;
|
||||
newPartPending = mNewPartPending;
|
||||
}
|
||||
if (isMultipart && newPartPending) {
|
||||
OnDataAvailable(aRequest, nullptr, 0, 0);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче