Comment 55 for bug 225379

Revision history for this message
In , Mc-hack (mc-hack) wrote :

I looked at the diff from this checkin for a while:

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-03-11+03&maxdate=2006-03-12+06&cvsroot=%2Fcvsroot

and tried to follow the surrounding code.

I added a private nsIChannel (mChannel) in the imgRequest class and
changed in imgRequest::Init() and imgRequest::OnStartRequest() to save
the channel in mChannel.

At the end of OnStartRequest() there is a check if we have any
observers left with an mObservers.IsEmpty() and a call to

this->Cancel(NS_IMAGELIB_ERROR_FAILURE);

I added an explicit call to mChannel->Cancel() here.

Trying out my changes against an Axis camera, everything seems to work
OK and the TCP connection is now closed when I close the tab or
window.

However, a lot of other sites breaks and shows no images what so
ever. I have no idea why, but that's probably because I don't know
ends nor tails of the Firefox code yet.

Any comments? Am I on the right track?