Adam [:hobophobe] <
unusua...@gmail.com> has asked Christian :Biesinger
(don't email me, ping me on IRC) <
cbies...@gmail.com> for superreview:
Attachment 644067: Address feedback
https://bugzilla.mozilla.org/attachment.cgi?id=644067&action=edit
Thanks, Christian.
> > +++ b/netwerk/base/public/nsASocketHandler.h
> > + // for server socket, whether only accepts local connections.
>
> whether -> which, I think
It was supposed to be whether, but I cleaned up the comment a bit to be
clearer. For server sockets, if they are bound to loopback, then they only
accept local connections.
> > +++ b/netwerk/base/src/nsSocketTransportService2.cpp
>
> I don't really understand why you need goingOffline here, can you explain?
This was what I referred to in comment 29. An assertion had indicated that
deadlock was possible when |Reset| was called in the locked block. While no
deadlockable path jumped out at me when I looked, I wanted to play it safe.
I tried to recreate it, but the warning no longer comes up. This patch puts
|Reset| back in the locked block and removes |goingOffline|.
> > +++ b/netwerk/protocol/http/nsHttpChannel.cpp
> > - if (offline)
> > - mLoadFlags |= LOAD_ONLY_FROM_CACHE;
>
> hrm, so I see why you're doing this, but a better solution would be highly
> desirable so that you can at least get at the cached page when you have no
> internet connection, instead of just an error page...
As Patrick mentioned in comment 31, it still tries to load from cache if
there's an entry for it.
For example, if I start the browser and load the Google Search page in a tab,
close it, go offline, and try to load Google Search in a new tab, it loads from
the cache. Same thing if I start the browser, immediately go offline, and then
try to load a URL from the about:cache list of cache entries.