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

Issue 980663002: Fix crash on referencing deleted SignedInDevicesManager observer (Closed)

Created:
5 years, 9 months ago by Rafał Chłodnicki
Modified:
5 years, 9 months ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, stanisc
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix crash on referencing deleted SignedInDevicesManager observer Each profile creates new instance of SignedInDevicesManager so, for example, opening incognito window and then closing it, destroyes an instance of SignedInDevicesManager created for this profile. The code has forgot to remove itself from the list of observers in EventRouter. That caused crash when that event was triggered later in a normal profile as EventRouter would reference stale pointer. In tests observer is not added and profile_ is null so null-checking it. R=rdevlin.cronin@chromium.org BUG= Committed: https://crrev.com/d6dcf8725b262caae50f899ab7c47e8ff3980928 Cr-Commit-Position: refs/heads/master@{#319755}

Patch Set 1 #

Total comments: 5

Patch Set 2 : address nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc View 1 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Rafał Chłodnicki
This API is not used internally AFAIK (we use it in Opera) and I'm not ...
5 years, 9 months ago (2015-03-04 23:01:30 UTC) #1
Devlin
Sorry for the delay. https://codereview.chromium.org/980663002/diff/1/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc File chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc (right): https://codereview.chromium.org/980663002/diff/1/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc#newcode119 chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc:119: if (profile_) { Will profile_ ...
5 years, 9 months ago (2015-03-09 16:35:43 UTC) #2
Rafał Chłodnicki
https://codereview.chromium.org/980663002/diff/1/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc File chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc (right): https://codereview.chromium.org/980663002/diff/1/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc#newcode119 chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.cc:119: if (profile_) { On 2015/03/09 16:35:43, Devlin wrote: > ...
5 years, 9 months ago (2015-03-09 20:46:43 UTC) #3
Devlin
lgtm
5 years, 9 months ago (2015-03-09 20:49:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/980663002/20001
5 years, 9 months ago (2015-03-09 21:06:45 UTC) #6
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-03-09 23:10:00 UTC) #7
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 23:10:56 UTC) #8
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d6dcf8725b262caae50f899ab7c47e8ff3980928
Cr-Commit-Position: refs/heads/master@{#319755}

Powered by Google App Engine
This is Rietveld 408576698