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.
I looked at the diff from this checkin for a while:
http:// bonsai. mozilla. org/cvsquery. cgi?treeid= default& module= PhoenixTinderbo x&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 :OnStartRequest () to save
changed in imgRequest::Init() and imgRequest:
the channel in mChannel.
At the end of OnStartRequest() there is a check if we have any IsEmpty( ) and a call to
observers left with an mObservers.
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?