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:
@@ -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
|
||||
//
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user