зеркало из https://github.com/mozilla/pjs.git
bug 398568: Fix prbool misuse in netwerk. r=biesi a=dsicore
This commit is contained in:
Родитель
516c1a8654
Коммит
060c62ce9f
|
@ -118,10 +118,10 @@ private:
|
||||||
|
|
||||||
|
|
||||||
void MarkDoomEntriesIfExpired() { mInfo |= eDoomEntriesIfExpiredMask; }
|
void MarkDoomEntriesIfExpired() { mInfo |= eDoomEntriesIfExpiredMask; }
|
||||||
PRBool WillDoomEntriesIfExpired() { return (mInfo & eDoomEntriesIfExpiredMask); }
|
PRBool WillDoomEntriesIfExpired() { return (0 != (mInfo & eDoomEntriesIfExpiredMask)); }
|
||||||
|
|
||||||
void MarkBlockingMode() { mInfo |= eBlockingModeMask; }
|
void MarkBlockingMode() { mInfo |= eBlockingModeMask; }
|
||||||
PRBool IsBlocking() { return (mInfo & eBlockingModeMask); }
|
PRBool IsBlocking() { return (0 != (mInfo & eBlockingModeMask)); }
|
||||||
PRBool IsNonBlocking() { return !(mInfo & eBlockingModeMask); }
|
PRBool IsNonBlocking() { return !(mInfo & eBlockingModeMask); }
|
||||||
|
|
||||||
void SetStoragePolicy(nsCacheStoragePolicy policy)
|
void SetStoragePolicy(nsCacheStoragePolicy policy)
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
|
|
||||||
void MarkDoomEntriesIfExpired() { mInfo |= eDoomEntriesIfExpiredMask; }
|
void MarkDoomEntriesIfExpired() { mInfo |= eDoomEntriesIfExpiredMask; }
|
||||||
void ClearDoomEntriesIfExpired() { mInfo &= ~eDoomEntriesIfExpiredMask; }
|
void ClearDoomEntriesIfExpired() { mInfo &= ~eDoomEntriesIfExpiredMask; }
|
||||||
PRBool WillDoomEntriesIfExpired() { return (mInfo & eDoomEntriesIfExpiredMask); }
|
PRBool WillDoomEntriesIfExpired() { return (0 != (mInfo & eDoomEntriesIfExpiredMask)); }
|
||||||
|
|
||||||
nsCacheStoragePolicy StoragePolicy()
|
nsCacheStoragePolicy StoragePolicy()
|
||||||
{
|
{
|
||||||
|
|
|
@ -144,7 +144,7 @@ public:
|
||||||
void SetEvictionRank( PRUint32 rank) { mEvictionRank = rank ? rank : 1; }
|
void SetEvictionRank( PRUint32 rank) { mEvictionRank = rank ? rank : 1; }
|
||||||
|
|
||||||
// DataLocation accessors
|
// DataLocation accessors
|
||||||
PRBool DataLocationInitialized() const { return mDataLocation & eLocationInitializedMask; }
|
PRBool DataLocationInitialized() const { return 0 != (mDataLocation & eLocationInitializedMask); }
|
||||||
void ClearDataLocation() { mDataLocation = 0; }
|
void ClearDataLocation() { mDataLocation = 0; }
|
||||||
|
|
||||||
PRUint32 DataFile() const
|
PRUint32 DataFile() const
|
||||||
|
@ -211,7 +211,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// MetaLocation accessors
|
// MetaLocation accessors
|
||||||
PRBool MetaLocationInitialized() const { return mMetaLocation & eLocationInitializedMask; }
|
PRBool MetaLocationInitialized() const { return 0 != (mMetaLocation & eLocationInitializedMask); }
|
||||||
void ClearMetaLocation() { mMetaLocation = 0; }
|
void ClearMetaLocation() { mMetaLocation = 0; }
|
||||||
PRUint32 MetaLocation() const { return mMetaLocation; }
|
PRUint32 MetaLocation() const { return mMetaLocation; }
|
||||||
|
|
||||||
|
|
|
@ -922,8 +922,8 @@ nsCookieService::Read()
|
||||||
|
|
||||||
PRInt64 expiry = stmt->AsInt64(5);
|
PRInt64 expiry = stmt->AsInt64(5);
|
||||||
PRInt64 lastAccessed = stmt->AsInt64(6);
|
PRInt64 lastAccessed = stmt->AsInt64(6);
|
||||||
PRBool isSecure = stmt->AsInt32(7);
|
PRBool isSecure = 0 != stmt->AsInt32(7);
|
||||||
PRBool isHttpOnly = stmt->AsInt32(8);
|
PRBool isHttpOnly = 0 != stmt->AsInt32(8);
|
||||||
|
|
||||||
// create a new nsCookie and assign the data.
|
// create a new nsCookie and assign the data.
|
||||||
nsCookie* newCookie =
|
nsCookie* newCookie =
|
||||||
|
|
|
@ -2548,9 +2548,9 @@ nsHttpChannel::GenCredsAndSetEntry(nsIHttpAuthenticator *auth,
|
||||||
// find out if this authenticator allows reuse of credentials and/or
|
// find out if this authenticator allows reuse of credentials and/or
|
||||||
// challenge.
|
// challenge.
|
||||||
PRBool saveCreds =
|
PRBool saveCreds =
|
||||||
authFlags & nsIHttpAuthenticator::REUSABLE_CREDENTIALS;
|
0 != (authFlags & nsIHttpAuthenticator::REUSABLE_CREDENTIALS);
|
||||||
PRBool saveChallenge =
|
PRBool saveChallenge =
|
||||||
authFlags & nsIHttpAuthenticator::REUSABLE_CHALLENGE;
|
0 != (authFlags & nsIHttpAuthenticator::REUSABLE_CHALLENGE);
|
||||||
|
|
||||||
// this getter never fails
|
// this getter never fails
|
||||||
nsHttpAuthCache *authCache = gHttpHandler->AuthCache();
|
nsHttpAuthCache *authCache = gHttpHandler->AuthCache();
|
||||||
|
|
|
@ -1080,9 +1080,9 @@ mozTXTToHTMLConv::CiteLevelTXT(const PRUnichar *line,
|
||||||
void
|
void
|
||||||
mozTXTToHTMLConv::ScanTXT(const PRUnichar * aInString, PRInt32 aInStringLength, PRUint32 whattodo, nsString& aOutString)
|
mozTXTToHTMLConv::ScanTXT(const PRUnichar * aInString, PRInt32 aInStringLength, PRUint32 whattodo, nsString& aOutString)
|
||||||
{
|
{
|
||||||
PRBool doURLs = whattodo & kURLs;
|
PRBool doURLs = 0 != (whattodo & kURLs);
|
||||||
PRBool doGlyphSubstitution = whattodo & kGlyphSubstitution;
|
PRBool doGlyphSubstitution = 0 != (whattodo & kGlyphSubstitution);
|
||||||
PRBool doStructPhrase = whattodo & kStructPhrase;
|
PRBool doStructPhrase = 0 != (whattodo & kStructPhrase);
|
||||||
|
|
||||||
PRUint32 structPhrase_strong = 0; // Number of currently open tags
|
PRUint32 structPhrase_strong = 0; // Number of currently open tags
|
||||||
PRUint32 structPhrase_underline = 0;
|
PRUint32 structPhrase_underline = 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче