Comment 47 for bug 367531

Revision history for this message
In , Patrick McManus (mcmanus-ducksong) wrote :

Comment on attachment 657902
Unbitrot

Review of attachment 657902:
-----------------------------------------------------------------

The net effect of this is going to mean the socket thread stays constant even when offline/online events occur. I think that's a really good thing and it will eliminate a few classes of bugs.

r+ contingent on these small items and answers to comment 40.

::: browser/base/content/test/browser_bug435325.js
@@ +40,5 @@
> finish();
> }
>
> registerCleanupFunction(function() {
> + Services.prefs.setIntPref("network.proxy.type", 2);

you need at least push/pop. Please comment that this is necessary because the mochitest proxy runs n localhost and localhost is now reachable even when offline.

::: netwerk/base/src/nsSocketTransportService2.cpp
@@ +684,5 @@
> +void
> +nsSocketTransportService::Reset(bool aGuardLocals)
> +{
> + // detach any sockets
> + PRInt32 i;

you've reintroduced PRint types.. need to scrub for those.

@@ +686,5 @@
> +{
> + // detach any sockets
> + PRInt32 i;
> + bool isGuarded;
> + for (i=mActiveCount-1; i>=0; --i) {

I know its copy and paste, but fix it up to
for (i = mActiveCouint -1; i >= 0; --i)

@@ +693,5 @@
> + mActiveList[i].mHandler->IsLocal(&isGuarded);
> + if (!isGuarded)
> + DetachSocket(mActiveList, &mActiveList[i]);
> + }
> + for (i=mIdleCount-1; i>=0; --i) {

again, fix the spacing

::: toolkit/components/places/tests/browser/browser_bug680727.js
@@ +17,5 @@
> gBrowser.selectedTab = gBrowser.addTab();
>
> + // Bypass proxy temporarily, (local is available in offline, see bug 87717)
> + Services.prefs.setIntPref("network.proxy.type", 0);
> +

same comments from bug435325

::: toolkit/mozapps/extensions/test/xpinstall/browser_offline.js
@@ +16,5 @@
> }
>
> function download_progress(addon, value, maxValue) {
> try {
> + Services.prefs.setIntPref("network.proxy.type", 0);

same comments from bug 435325