Bustage fix for c7562242f88e (bug 480350)

This commit is contained in:
Blair McBride 2010-03-11 13:54:43 +13:00
parent 8274492c49
commit c6f8ea29d3

View File

@ -5124,36 +5124,6 @@ nsNavHistory::UnregisterOpenPage(nsIURI* aURI)
}
NS_IMETHODIMP
nsNavHistory::UnregisterOpenPage(nsIURI* aURI)
{
NS_ASSERTION(NS_IsMainThread(), "This can only be called on the main thread");
NS_ENSURE_ARG(aURI);
// Entering Private Browsing mode will unregister all open pages, therefore
// there shouldn't be anything in the moz_openpages_temp table. So we can stop
// now without doing any unnecessary work.
if (InPrivateBrowsingMode())
return NS_OK;
PRInt64 placeId;
nsresult rv = GetUrlIdFor(aURI, &placeId, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
if (placeId == 0)
return NS_OK;
mozStorageStatementScoper scoper(mDBUnregisterOpenPage);
rv = mDBUnregisterOpenPage->BindInt64Parameter(0, placeId);
NS_ENSURE_SUCCESS(rv, rv);
rv = mDBUnregisterOpenPage->Execute();
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
// nsNavHistory::SetCharsetForURI
//
// Sets the character-set for a URI.