bug 342729: Crash [@ TableUpdateListener::OnStopRequest] on restart after

installing extensions
patch: make sure mDBService exists
r+a181=darin
This commit is contained in:
tony%ponderer.org 2006-06-27 01:57:26 +00:00
Родитель 3c4de3e5d1
Коммит 30714a0af7
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -99,9 +99,10 @@ TableUpdateListener::OnDataAvailable(nsIRequest *request,
PRUint32 aSourceOffset,
PRUint32 aLength)
{
LOG(("OnDataAvailable (%d bytes)", aLength));
if (!mDBService)
return NS_ERROR_NOT_INITIALIZED;
NS_ASSERTION(mDBService != nsnull, "UrlClassifierDBService is null");
LOG(("OnDataAvailable (%d bytes)", aLength));
nsresult rv;
// Copy the data into a nsCString
@ -121,6 +122,9 @@ NS_IMETHODIMP
TableUpdateListener::OnStopRequest(nsIRequest *request, nsISupports* context,
nsresult aStatus)
{
if (!mDBService)
return NS_ERROR_NOT_INITIALIZED;
LOG(("OnStopRequest status: %d", aStatus));
// If we got the whole stream, call Finish to commit the changes.