Bug 782616 - Use more appropriate return types than nsresult; r=mak

This commit is contained in:
Aryeh Gregor 2012-08-14 12:10:42 +03:00
parent 3d59821c90
commit 61fdd38409
3 changed files with 3 additions and 3 deletions

View File

@ -907,7 +907,7 @@ private:
mozStorageStatementScoper scoper(stmt);
nsresult rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("visit_date"),
_place.visitTime);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS(rv, false);
scoper.Abandon();
}

View File

@ -714,7 +714,7 @@ nsNavHistory::GetNewSessionID()
"SELECT session FROM moz_historyvisits "
"ORDER BY visit_date DESC "
), getter_AddRefs(selectSession));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS(rv, 0);
bool hasSession;
if (NS_SUCCEEDED(selectSession->ExecuteStep(&hasSession)) && hasSession) {
mLastSessionID = selectSession->AsInt64(0) + 1;

View File

@ -550,7 +550,7 @@ function test_invalid_sessionId_ignored()
new VisitInfo(),
],
};
place.visits[0].sessionId = -1;
place.visits[0].sessionId = 0;
do_check_false(gGlobalHistory.isVisited(place.uri));
gHistory.updatePlaces(place, expectHandleResult(function(aPlaceInfo) {