Bug 173561: move magic mask constant for nsIRequest into IDL file. r=biesi

This commit is contained in:
Randell Jesup 2011-06-09 15:03:41 -04:00
parent cf9d114701
commit 6ddbc2b98e
3 changed files with 8 additions and 3 deletions

View File

@ -1815,8 +1815,8 @@ NS_IMETHODIMP imgLoader::LoadImageWithChannel(nsIChannel *channel, imgIDecoderOb
nsCOMPtr<nsILoadGroup> loadGroup;
channel->GetLoadGroup(getter_AddRefs(loadGroup));
// XXX: It looks like the wrong load flags are being passed in...
requestFlags &= 0xFFFF;
// Filter out any load flags not from nsIRequest
requestFlags &= nsIRequest::LOAD_REQUESTMASK;
nsresult rv = NS_OK;
if (request) {

View File

@ -135,6 +135,11 @@ interface nsIRequest : nsISupports
*/
attribute nsLoadFlags loadFlags;
/**
* Mask defining the bits reserved for nsIRequest LoadFlags
*/
const unsigned long LOAD_REQUESTMASK = 0xFFFF;
/**************************************************************************
* Listed below are the various load flags which may be or'd together.
*/

View File

@ -506,7 +506,7 @@ nsLoadGroup::SetDefaultLoadRequest(nsIRequest *aRequest)
// Mask off any bits that are not part of the nsIRequest flags.
// in particular, nsIChannel::LOAD_DOCUMENT_URI...
//
mLoadFlags &= 0xFFFF;
mLoadFlags &= nsIRequest::LOAD_REQUESTMASK;
}
// Else, do not change the group's load flags (see bug 95981)
return NS_OK;