зеркало из https://github.com/mozilla/gecko-dev.git
Bug 676188 - Misc misuses of PRBool caught by the compiler, r=jimm,jst,bz,dougt,roc,mak
This commit is contained in:
Родитель
56618dd3d2
Коммит
a66b1751b7
|
@ -344,9 +344,11 @@ nsWindowsShellService::IsDefaultBrowserVista(PRBool* aIsDefaultBrowser)
|
|||
(void**)&pAAR);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
BOOL res;
|
||||
hr = pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE,
|
||||
APP_REG_NAME,
|
||||
aIsDefaultBrowser);
|
||||
&res);
|
||||
*aIsDefaultBrowser = res;
|
||||
|
||||
pAAR->Release();
|
||||
return PR_TRUE;
|
||||
|
|
|
@ -367,16 +367,18 @@ nsCookiePermission::CanSetCookie(nsIURI *aURI,
|
|||
}
|
||||
|
||||
PRBool rememberDecision = PR_FALSE;
|
||||
PRInt32 dialogRes = nsICookiePromptService::DENY_COOKIE;
|
||||
rv = cookiePromptService->CookieDialog(parent, aCookie, hostPort,
|
||||
countFromHost, foundCookie,
|
||||
&rememberDecision, aResult);
|
||||
&rememberDecision, &dialogRes);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
if (*aResult == nsICookiePromptService::ACCEPT_SESSION_COOKIE)
|
||||
|
||||
*aResult = !!dialogRes;
|
||||
if (dialogRes == nsICookiePromptService::ACCEPT_SESSION_COOKIE)
|
||||
*aIsSession = PR_TRUE;
|
||||
|
||||
if (rememberDecision) {
|
||||
switch (*aResult) {
|
||||
switch (dialogRes) {
|
||||
case nsICookiePromptService::DENY_COOKIE:
|
||||
mPermMgr->Add(aURI, kPermissionType, (PRUint32) nsIPermissionManager::DENY_ACTION,
|
||||
nsIPermissionManager::EXPIRE_NEVER, 0);
|
||||
|
|
|
@ -114,7 +114,7 @@ nsCookiePromptService::CookieDialog(nsIDOMWindow *aParent,
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// get back output parameters
|
||||
PRBool tempValue;
|
||||
PRInt32 tempValue;
|
||||
block->GetInt(nsICookieAcceptDialog::ACCEPT_COOKIE, &tempValue);
|
||||
*aAccept = tempValue;
|
||||
|
||||
|
|
|
@ -204,8 +204,8 @@ public:
|
|||
PRBool IsFirstInserted() const;
|
||||
void SetFirstInserted(PRBool aValue);
|
||||
|
||||
PRBool GetContentHeight() const;
|
||||
void SetContentHeight(nscoord aTwipValue);
|
||||
nscoord GetContentHeight() const;
|
||||
void SetContentHeight(nscoord aTwipValue);
|
||||
|
||||
PRBool HasStyleHeight() const;
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ VR_INTERFACE(REGERR) VR_UninstallDeleteFileFromList(char *component_path, char *
|
|||
VR_INTERFACE(REGERR) VR_UninstallDeleteSharedFilesKey(char *regPackageName);
|
||||
VR_INTERFACE(REGERR) VR_UninstallDestroy(char *regPackageName);
|
||||
VR_INTERFACE(REGERR) VR_EnumUninstall(REGENUM *state, char* userPackageName,
|
||||
int32 len1, char*regPackageName, int32 len2, PRBool bSharedList);
|
||||
int32 len1, char*regPackageName, int32 len2, XP_Bool bSharedList);
|
||||
VR_INTERFACE(REGERR) VR_GetUninstallUserName(char *regPackageName, char *outbuf, uint32 buflen);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
|
|
@ -377,7 +377,7 @@ PRBool nsAutodial::IsRASConnected()
|
|||
DWORD structSize = sizeof(rasConn);
|
||||
|
||||
if (!LoadRASapi32DLL())
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
return PR_FALSE;
|
||||
|
||||
DWORD result = (*mpRasEnumConnections)(&rasConn, &structSize, &connections);
|
||||
|
||||
|
@ -671,7 +671,7 @@ PRBool nsAutodial::IsAutodialServiceEnabled(int location)
|
|||
if (!LoadRASapi32DLL())
|
||||
return PR_FALSE;
|
||||
|
||||
PRBool enabled;
|
||||
BOOL enabled;
|
||||
if ((*mpRasGetAutodialEnable)(location, &enabled) != ERROR_SUCCESS)
|
||||
{
|
||||
LOGE(("Autodial: Error calling RasGetAutodialEnable()"));
|
||||
|
|
|
@ -338,7 +338,7 @@ nsStandardURL::Prepath()
|
|||
}
|
||||
|
||||
inline const nsDependentCSubstring
|
||||
nsStandardURL::Userpass(int includeDelim)
|
||||
nsStandardURL::Userpass(PRBool includeDelim)
|
||||
{
|
||||
PRUint32 pos=0, len=0;
|
||||
// if there is no username, then there can be no password
|
||||
|
|
|
@ -882,7 +882,7 @@ CNavDTD::HandleDefaultStartToken(CToken* aToken, eHTMLTags aChildTag,
|
|||
if (mParserCommand != eViewFragment) {
|
||||
PRBool theChildAgrees = PR_TRUE;
|
||||
PRInt32 theIndex = mBodyContext->GetCount();
|
||||
PRBool theParentContains = PR_FALSE;
|
||||
PRInt32 theParentContains = 0;
|
||||
|
||||
do {
|
||||
eHTMLTags theParentTag = mBodyContext->TagAt(--theIndex);
|
||||
|
|
|
@ -233,10 +233,14 @@ nsParentalControlsServiceWin::RequestURIOverride(nsIURI *aTarget, nsIInterfaceRe
|
|||
if (hWnd == nsnull)
|
||||
hWnd = GetDesktopWindow();
|
||||
|
||||
BOOL ret;
|
||||
nsRefPtr<IWPCWebSettings> wpcws;
|
||||
if (SUCCEEDED(mPC->GetWebSettings(NULL, getter_AddRefs(wpcws))))
|
||||
if (SUCCEEDED(mPC->GetWebSettings(NULL, getter_AddRefs(wpcws)))) {
|
||||
wpcws->RequestURLOverride(hWnd, NS_ConvertUTF8toUTF16(spec).get(),
|
||||
0, NULL, _retval);
|
||||
0, NULL, &ret);
|
||||
*_retval = ret;
|
||||
}
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -308,11 +312,14 @@ nsParentalControlsServiceWin::RequestURIOverrides(nsIArray *aTargets, nsIInterfa
|
|||
|
||||
if (!uriIdx)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
|
||||
BOOL ret;
|
||||
nsRefPtr<IWPCWebSettings> wpcws;
|
||||
if (SUCCEEDED(mPC->GetWebSettings(NULL, getter_AddRefs(wpcws))))
|
||||
if (SUCCEEDED(mPC->GetWebSettings(NULL, getter_AddRefs(wpcws)))) {
|
||||
wpcws->RequestURLOverride(hWnd, NS_ConvertUTF8toUTF16(rootSpec).get(),
|
||||
uriIdx, (LPCWSTR*)arrUrls.get(), _retval);
|
||||
uriIdx, (LPCWSTR*)arrUrls.get(), &ret);
|
||||
*_retval = ret;
|
||||
}
|
||||
|
||||
// Free up the allocated strings in our array
|
||||
for (idx = 0; idx < uriIdx; idx++)
|
||||
|
|
|
@ -2680,7 +2680,7 @@ nsNavHistory::AddVisit(nsIURI* aURI, PRTime aTime, nsIURI* aReferringURI,
|
|||
rv = stmt->GetInt32(2, &oldTypedState);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool oldHiddenState = 0;
|
||||
PRInt32 oldHiddenState = 0;
|
||||
rv = stmt->GetInt32(3, &oldHiddenState);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче