This commit is contained in:
gagan%netscape.com 1999-03-16 07:46:57 +00:00
Родитель 27adab7d10
Коммит 8db3d855d8
1 изменённых файлов: 13 добавлений и 12 удалений

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

@ -667,19 +667,20 @@ nsHttpUrlImpl::ReconstructSpec(void)
PRBool nsHttpUrlImpl::Equals(const nsIURL* aURL) const
{
PRBool bIsEqual;
NS_LOCK_INSTANCE();
nsIHttpURL* otherURL;
if (NS_SUCCEEDED(((nsIURL*)aURL)->QueryInterface(kIHttpURLIID, (void**)&otherURL))) {
nsHttpUrlImpl* other = (nsHttpUrlImpl*)otherURL;
bIsEqual = PRBool((0 == PL_strcmp(mProtocol, other->mProtocol)) &&
(0 == PL_strcasecmp(mHost, other->mHost)) &&
(0 == PL_strcmp(mFile, other->mFile)));
NS_RELEASE(otherURL);
PRBool bIsEqual(PR_FALSE);
if (aURL)
{
NS_LOCK_INSTANCE();
nsIHttpURL* otherURL;
if (NS_SUCCEEDED(((nsIURL*)aURL)->QueryInterface(kIHttpURLIID, (void**)&otherURL))) {
nsHttpUrlImpl* other = (nsHttpUrlImpl*)otherURL;
bIsEqual = PRBool((0 == PL_strcmp(mProtocol, other->mProtocol)) &&
(0 == PL_strcasecmp(mHost, other->mHost)) &&
(0 == PL_strcmp(mFile, other->mFile)));
NS_RELEASE(otherURL);
}
NS_UNLOCK_INSTANCE();
}
else
bIsEqual = PR_FALSE;
NS_UNLOCK_INSTANCE();
return bIsEqual;
}