зеркало из https://github.com/mozilla/gecko-dev.git
Fix regressions from last checkin (bug 203927). r=bugzilla@standard8.demon.co.uk, sr=bienvenu.
This commit is contained in:
Родитель
385a6f4907
Коммит
24fbec489c
|
@ -3132,23 +3132,19 @@ nsAddrDBEnumerator::HasMoreElements(PRBool *aResult)
|
|||
{
|
||||
*aResult = PR_FALSE;
|
||||
|
||||
if (!mDb || !mDbTable || !mDb->GetEnv())
|
||||
if (!mDbTable || !mDb->GetEnv())
|
||||
{
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIMdbTableRowCursor> rowCursor;
|
||||
mDbTable->GetTableRowCursor(mDb->GetEnv(), mRowPos,
|
||||
getter_AddRefs(mRowCursor));
|
||||
getter_AddRefs(rowCursor));
|
||||
NS_ENSURE_TRUE(rowCursor, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIMdbRow> currentRow;
|
||||
mdb_pos rowPos;
|
||||
rowCursor->NextRow(mDb->GetEnv(), getter_AddRefs(currentRow), &rowPos);
|
||||
while (currentRow)
|
||||
{
|
||||
mdbOid rowOid;
|
||||
if (NS_SUCCEEDED(mCurrentRow->GetOid(mDb->GetEnv(), &rowOid)))
|
||||
rowCursor->NextRowOid(mDb->GetEnv(), &rowOid, nsnull);
|
||||
while (rowOid.mOid_Id != (mdb_id)-1)
|
||||
{
|
||||
if (mDb->IsListRowScopeToken(rowOid.mOid_Scope) ||
|
||||
mDb->IsCardRowScopeToken(rowOid.mOid_Scope))
|
||||
|
@ -3162,9 +3158,8 @@ nsAddrDBEnumerator::HasMoreElements(PRBool *aResult)
|
|||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
mRowCursor->NextRow(mDb->GetEnv(), getter_AddRefs(currentRow), &rowPos);
|
||||
rowCursor->NextRowOid(mDb->GetEnv(), &rowOid, nsnull);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -3175,7 +3170,7 @@ nsAddrDBEnumerator::GetNext(nsISupports **aResult)
|
|||
{
|
||||
*aResult = nsnull;
|
||||
|
||||
if (!mDb || !mDbTable || !mDb->GetEnv())
|
||||
if (!mDbTable || !mDb->GetEnv())
|
||||
{
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -3264,7 +3259,7 @@ nsListAddressEnumerator::HasMoreElements(PRBool *aResult)
|
|||
{
|
||||
*aResult = PR_FALSE;
|
||||
|
||||
if (!mDb || !mDbTable || !mDb->GetEnv())
|
||||
if (!mDbTable || !mDb->GetEnv())
|
||||
{
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -3276,7 +3271,7 @@ nsListAddressEnumerator::HasMoreElements(PRBool *aResult)
|
|||
getter_AddRefs(currentRow));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*aResult = currentRow == nsnull;
|
||||
*aResult = currentRow != nsnull;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -3287,7 +3282,7 @@ nsListAddressEnumerator::GetNext(nsISupports **aResult)
|
|||
{
|
||||
*aResult = nsnull;
|
||||
|
||||
if (!mDb || !mDbTable || !mDb->GetEnv())
|
||||
if (!mDbTable || !mDb->GetEnv())
|
||||
{
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче