mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 228448 - Remove '=='/'!=' 'PR_FALSE'/'PR_TRUE'; (Gv1b) /xpfe/components/directory/nsDirectoryViewer.cpp.
r=dean_tessman.
This commit is contained in:
parent
e1a41f9527
commit
b906ab8434
@ -305,14 +305,13 @@ nsHTTPIndex::OnStartRequest(nsIRequest *request, nsISupports* aContext)
|
||||
jsval jslistener = OBJECT_TO_JSVAL(jsobj);
|
||||
|
||||
// ...and stuff it into the global context
|
||||
PRBool ok;
|
||||
JSAutoRequest ar(cx);
|
||||
ok = JS_SetProperty(cx, global, "HTTPIndex", &jslistener);
|
||||
|
||||
PRBool ok = JS_SetProperty(cx, global, "HTTPIndex", &jslistener);
|
||||
NS_ASSERTION(ok, "unable to set Listener property");
|
||||
if (! ok)
|
||||
if (!ok)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (!aContext) {
|
||||
nsCOMPtr<nsIChannel> channel(do_QueryInterface(request));
|
||||
NS_ASSERTION(channel, "request should be a channel");
|
||||
@ -439,7 +438,6 @@ nsHTTPIndex::OnIndexAvailable(nsIRequest* aRequest, nsISupports *aContext,
|
||||
return rv;
|
||||
|
||||
PRBool isDirType = (type == nsIDirIndex::TYPE_DIRECTORY);
|
||||
|
||||
if (isDirType && entryuriC.Last() != '/') {
|
||||
entryuriC.Append('/');
|
||||
}
|
||||
@ -785,23 +783,16 @@ nsHTTPIndex::isWellknownContainerURI(nsIRDFResource *r)
|
||||
{
|
||||
nsCOMPtr<nsIRDFNode> node;
|
||||
GetTarget(r, kNC_IsContainer, PR_TRUE, getter_AddRefs(node));
|
||||
|
||||
PRBool isContainerFlag = PR_FALSE;
|
||||
|
||||
if (node && NS_SUCCEEDED(node->EqualsNode(kTrueLiteral, &isContainerFlag))) {
|
||||
return isContainerFlag;
|
||||
} else {
|
||||
nsXPIDLCString uri;
|
||||
|
||||
GetDestination(r,uri);
|
||||
|
||||
if ((uri.get()) && (!strncmp(uri, kFTPProtocol, sizeof(kFTPProtocol) - 1))) {
|
||||
if (uri.Last() == '/') {
|
||||
isContainerFlag = PR_TRUE;
|
||||
}
|
||||
}
|
||||
if (node) {
|
||||
PRBool isContainerFlag;
|
||||
if (NS_SUCCEEDED(node->EqualsNode(kTrueLiteral, &isContainerFlag)))
|
||||
return isContainerFlag;
|
||||
}
|
||||
return isContainerFlag;
|
||||
|
||||
nsXPIDLCString uri;
|
||||
GetDestination(r, uri);
|
||||
return uri.get() && !strncmp(uri, kFTPProtocol, sizeof(kFTPProtocol) - 1) &&
|
||||
(uri.Last() == '/');
|
||||
}
|
||||
|
||||
|
||||
@ -898,19 +889,16 @@ nsHTTPIndex::GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, PRBo
|
||||
{
|
||||
// check and see if we already have data for the search in question;
|
||||
// if we do, don't bother doing the search again
|
||||
PRBool hasResults = PR_FALSE;
|
||||
PRBool hasResults;
|
||||
if (NS_SUCCEEDED((*_retval)->HasMoreElements(&hasResults)) &&
|
||||
(hasResults == PR_TRUE))
|
||||
{
|
||||
doNetworkRequest = PR_FALSE;
|
||||
}
|
||||
hasResults)
|
||||
doNetworkRequest = PR_FALSE;
|
||||
}
|
||||
|
||||
// Note: if we need to do a network request, do it out-of-band
|
||||
// (because the XUL template builder isn't re-entrant)
|
||||
// by using a global connection list and an immediately-firing timer
|
||||
|
||||
if ((doNetworkRequest == PR_TRUE) && (mConnectionList))
|
||||
if (doNetworkRequest && mConnectionList)
|
||||
{
|
||||
PRInt32 connectionIndex = mConnectionList->IndexOf(aSource);
|
||||
if (connectionIndex < 0)
|
||||
@ -978,8 +966,6 @@ nsHTTPIndex::FireTimer(nsITimer* aTimer, void* aClosure)
|
||||
if (!httpIndex) return;
|
||||
|
||||
// don't return out of this loop as mTimer may need to be cancelled afterwards
|
||||
PRBool refireTimer = PR_FALSE;
|
||||
|
||||
PRUint32 numItems = 0;
|
||||
if (httpIndex->mConnectionList)
|
||||
{
|
||||
@ -1016,7 +1002,7 @@ nsHTTPIndex::FireTimer(nsITimer* aTimer, void* aClosure)
|
||||
rv = channel->AsyncOpen(httpIndex, aSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (httpIndex->mNodeList)
|
||||
{
|
||||
httpIndex->mNodeList->Count(&numItems);
|
||||
@ -1058,7 +1044,8 @@ nsHTTPIndex::FireTimer(nsITimer* aTimer, void* aClosure)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PRBool refireTimer = PR_FALSE;
|
||||
// check both lists to see if the timer needs to continue firing
|
||||
if (httpIndex->mConnectionList)
|
||||
{
|
||||
@ -1243,10 +1230,10 @@ nsHTTPIndex::ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval
|
||||
{
|
||||
nsCOMPtr<nsISimpleEnumerator> anonArcs;
|
||||
rv = mInner->ArcLabelsOut(aSource, getter_AddRefs(anonArcs));
|
||||
PRBool hasResults = PR_TRUE;
|
||||
PRBool hasResults;
|
||||
while (NS_SUCCEEDED(rv) &&
|
||||
NS_SUCCEEDED(anonArcs->HasMoreElements(&hasResults)) &&
|
||||
hasResults == PR_TRUE)
|
||||
NS_SUCCEEDED(anonArcs->HasMoreElements(&hasResults)) &&
|
||||
hasResults)
|
||||
{
|
||||
nsCOMPtr<nsISupports> anonArc;
|
||||
if (NS_FAILED(anonArcs->GetNext(getter_AddRefs(anonArc))))
|
||||
@ -1354,10 +1341,11 @@ nsDirectoryViewerFactory::CreateInstance(const char *aCommand,
|
||||
nsCOMPtr<nsIPrefBranch> prefSrv = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
PRBool useXUL = PR_FALSE;
|
||||
PRBool viewSource = (PL_strstr(aContentType,"view-source") != 0);
|
||||
|
||||
#ifdef MOZ_RDF
|
||||
PRBool useXUL = PR_FALSE;
|
||||
|
||||
PRInt32 dirPref;
|
||||
rv = prefSrv->GetIntPref("network.dir.format", &dirPref);
|
||||
if (NS_SUCCEEDED(rv) && dirPref == FORMAT_XUL) {
|
||||
@ -1488,4 +1476,3 @@ nsDirectoryViewerFactory::CreateBlankDocument(nsILoadGroup *aLoadGroup,
|
||||
NS_NOTYETIMPLEMENTED("didn't expect to get here");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user