Commit 04d41629 authored by Amin Hassani's avatar Amin Hassani Committed by chrome-bot
Browse files

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: default avatarAmin Hassani <ahassani@chromium.org>
Reviewed-by: default avatarSen Jiang <senj@chromium.org>
parent 8cb94837
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment