Linux: fix bug 75508, a crash when receiving notifications of proxy settings changes.
Linux: fix bug 75508, a crash when receiving notifications of proxy settings changes.

This ended up being a use-after-free bug after all, as the memory allocator was
overwriting the sentinel value I was storing to indicate this, so I had
previously thought it was stray memory corruption. The problem was that the
GConf library was returning the same GConf client object multiple times, and
merely increasing the reference count. That's fine except that we were counting
on being able to stop incoming notifications by unreferencing it; however, this
only works when there is only one reference. So, as soon as you ended an
incognito session, any further changes to proxy settings would cause a crash.

We now explicitly stop the notifications before unreferencing the client.

BUG=75508
TEST=changing proxy settings after opening and closing an incognito window does not crash

Review URL: http://codereview.chromium.org/9309104

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@120602 0039d316-1c4b-4281-b951-d872f2087c98

gavinp/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium