update_engine: Fix a memory access violation
Somewhere down in HttpFetcher there is a pointer to ChromeBrowserProxyResolver. But the actual object gets deleted before ActionProcessor is deleted. But ActionProcessor's dtor makes calls that sometimes eventually gets into the instance of ChromeBrowserproxyresolver and we get a memory violation. For now just declare ChromeBrowserProxyResolver before ActionProcessor so it still exists when the ActionProcessor uses it. Later use shared_ptr to properly handle it. BUG=chromium:915922 TEST=cros flash TEST=Instrumented the dtors and manually stopped the update_engine process to see the order of dtors are correct. Change-Id: Ie9fa654103605f04c82521c29614dbcd4fb083e8 Reviewed-on: https://chromium-review.googlesource.com/1388105 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by:Amin Hassani <ahassani@chromium.org> Reviewed-by:
Sen Jiang <senj@chromium.org>
Loading
Please sign in to comment