Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 2710733002: Fix PreferenceConnectionManagerTeardown (Closed)

Created:
3 years, 10 months ago by jonross
Modified:
3 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix PreferenceConnectionManagerTeardown It is possible for the teardown order of chrome to not be as expected. PreferenceConnectionManager was expecting to live until profile destruction, at which point it would close mojo connections. However it is possible for the connection manager to be deleted early, Leaving connections open. They would eventually close during shutdown, and attempt to notify the now dead connection manager. This change updates PreferenceConnectionManager to use the new StrongBindingSet. This set handles removing of StrongBindings from the collection when connection errors occur. Thus replacing the manual handling written in the connection manager which had error prone base::Unretained(this). The connections are all deleted when the PreferenceConnectionManager is destroyed. TEST=manual testing with asan builds BUG=687933 Review-Url: https://codereview.chromium.org/2710733002 Cr-Commit-Position: refs/heads/master@{#452044} Committed: https://chromium.googlesource.com/chromium/src/+/0932b390e4b08af8590e8553a7b2a1fc8ef9c99b

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -44 lines) Patch
M chrome/browser/prefs/preferences_connection_manager.h View 3 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/prefs/preferences_connection_manager.cc View 3 chunks +6 lines, -36 lines 1 comment Download

Messages

Total messages: 19 (8 generated)
jonross
https://codereview.chromium.org/2710733002/diff/1/chrome/browser/prefs/preferences_connection_manager.cc File chrome/browser/prefs/preferences_connection_manager.cc (left): https://codereview.chromium.org/2710733002/diff/1/chrome/browser/prefs/preferences_connection_manager.cc#oldcode109 chrome/browser/prefs/preferences_connection_manager.cc:109: } The functionality that was here was moved to ...
3 years, 10 months ago (2017-02-21 15:55:54 UTC) #1
jonross
Hey sky@, Could you take a look at this change to the shutdown order of ...
3 years, 10 months ago (2017-02-21 15:56:28 UTC) #3
sky
LGTM - is it possible to add test coverage?
3 years, 10 months ago (2017-02-21 18:32:16 UTC) #4
jonross
On 2017/02/21 18:32:16, sky wrote: > LGTM - is it possible to add test coverage? ...
3 years, 10 months ago (2017-02-21 18:42:34 UTC) #5
sky
Ok, fair enough. On Tue, Feb 21, 2017 at 10:42 AM, <jonross@chromium.org> wrote: > On ...
3 years, 10 months ago (2017-02-21 21:31:20 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2710733002/1
3 years, 10 months ago (2017-02-21 21:34:25 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on ...
3 years, 10 months ago (2017-02-21 23:39:07 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2710733002/1
3 years, 10 months ago (2017-02-21 23:56:44 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-22 01:59:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2710733002/1
3 years, 10 months ago (2017-02-22 14:47:01 UTC) #16
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 14:50:44 UTC) #19
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/0932b390e4b08af8590e8553a7b2...

Powered by Google App Engine
This is Rietveld 408576698