Bug 430600 - crash in CanAddURI (r=mano, a=beltzner)

This commit is contained in:
dietrich@mozilla.com 2008-04-24 12:42:01 -07:00
parent dc9a2d7666
commit dcc488e824

View File

@ -2403,9 +2403,11 @@ nsNavHistory::MarkPageAsFollowedBookmark(nsIURI* aURI)
// we are suppose to try all the things we know not to allow in and then if
// we don't bail go on and allow it in.
nsresult
NS_IMETHODIMP
nsNavHistory::CanAddURI(nsIURI* aURI, PRBool* canAdd)
{
NS_ENSURE_ARG_POINTER(aURI);
nsCAutoString scheme;
nsresult rv = aURI->GetScheme(scheme);
NS_ENSURE_SUCCESS(rv, rv);
@ -2450,6 +2452,8 @@ nsNavHistory::AddVisit(nsIURI* aURI, PRTime aTime, nsIURI* aReferringURI,
PRInt32 aTransitionType, PRBool aIsRedirect,
PRInt64 aSessionID, PRInt64* aVisitID)
{
NS_ENSURE_ARG_POINTER(aURI);
// Filter out unwanted URIs, silently failing
PRBool canAdd = PR_FALSE;
nsresult rv = CanAddURI(aURI, &canAdd);