Fixes bug 72348 "Page load performance slower in 0.8.1 than under 0.8"

r/sr=dougt,brendan


git-svn-id: svn://10.0.0.236/trunk@90730 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com
2001-03-29 02:34:19 +00:00
parent 8d277c87e5
commit b180a3e10a
2 changed files with 12 additions and 1 deletions

View File

@@ -176,6 +176,12 @@ nsOnDataAvailableEvent::HandleEvent()
rv = NS_ERROR_NOT_IMPLEMENTED;
}
// Cancel the request on unexpected errors
if (NS_FAILED(rv) && (rv != NS_BASE_STREAM_CLOSED)) {
LOG(("OnDataAvailable failed [rv=%x] canceling request!\n"));
mRequest->Cancel(rv);
}
//
// Update the listener status
//

View File

@@ -122,7 +122,12 @@ nsOnStartRequestEvent::HandleEvent()
return NS_ERROR_FAILURE;
}
return observer->OnStartRequest(mRequest, mContext);
nsresult rv = observer->OnStartRequest(mRequest, mContext);
if (NS_FAILED(rv)) {
LOG(("OnStartRequest failed [rv=%x] canceling request!\n", rv));
mRequest->Cancel(rv);
}
return rv;
}
//