Bug 1640332. Move fields out of the bitfield that is accessed off main thread. r=aosmond

We don't access them off main thread so just move them out of the bitfield that is protected by the mutex.

Differential Revision: https://phabricator.services.mozilla.com/D76579
This commit is contained in:
Timothy Nikkel 2020-05-26 02:06:00 +00:00
Родитель 73f14abd78
Коммит 821ecf5a31
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -62,15 +62,15 @@ imgRequest::imgRequest(imgLoader* aLoader, const ImageCacheKey& aCacheKey)
mCORSMode(imgIRequest::CORS_NONE),
mImageErrorCode(NS_OK),
mImageAvailable(false),
mIsDeniedCrossSiteCORSRequest(false),
mIsCrossSiteNoCORSRequest(false),
mMutex("imgRequest"),
mProgressTracker(new ProgressTracker()),
mIsMultiPartChannel(false),
mIsInCache(false),
mDecodeRequested(false),
mNewPartPending(false),
mHadInsecureRedirect(false),
mIsDeniedCrossSiteCORSRequest(false),
mIsCrossSiteNoCORSRequest(false) {
mHadInsecureRedirect(false) {
LOG_FUNC(gImgLog, "imgRequest::imgRequest()");
}

Просмотреть файл

@ -284,6 +284,8 @@ class imgRequest final : public nsIStreamListener,
// If we've called OnImageAvailable.
bool mImageAvailable;
bool mIsDeniedCrossSiteCORSRequest;
bool mIsCrossSiteNoCORSRequest;
mutable mozilla::Mutex mMutex;
@ -297,8 +299,6 @@ class imgRequest final : public nsIStreamListener,
bool mDecodeRequested : 1;
bool mNewPartPending : 1;
bool mHadInsecureRedirect : 1;
bool mIsDeniedCrossSiteCORSRequest : 1;
bool mIsCrossSiteNoCORSRequest : 1;
};
#endif // mozilla_image_imgRequest_h