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

Issue 2668383004: [DIAL] Break circular dependency in DialFetchDeviceDescriptionFunction. (Closed)

Created:
3 years, 10 months ago by imcheng
Modified:
3 years, 10 months ago
Reviewers:
mark a. foltz
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DIAL] Break circular dependency in DialFetchDeviceDescriptionFunction. DeviceDescriptionFetcher has 2 references (in the 2 calbacks) to the DialFetchDeviceDescriptionFunction that owns it, but only 1 of the 2 references is removed at the end state. This results in a circular dependency which prevents the function from being destroyed. This patch manually destroys the DeviceDescriptionFetcher after the fetching is done to break the circular dependency. BUG=688089 Review-Url: https://codereview.chromium.org/2668383004 Cr-Commit-Position: refs/heads/master@{#447857} Committed: https://chromium.googlesource.com/chromium/src/+/d8033dadec98c7c2f4c407f89c128b166b5922ef

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed Mark's comments #

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

Messages

Total messages: 21 (10 generated)
imcheng
mfoltz@: PTAL. I wonder if it would make sense to make DeviceDescriptionFetcher destroy itself upon ...
3 years, 10 months ago (2017-02-02 20:03:54 UTC) #3
mark a. foltz
On 2017/02/02 at 20:03:54, imcheng wrote: > mfoltz@: PTAL. > > I wonder if it ...
3 years, 10 months ago (2017-02-02 20:24:42 UTC) #4
mark a. foltz
LGTM but there might be a simpler fix. https://codereview.chromium.org/2668383004/diff/1/chrome/browser/extensions/api/dial/dial_api.cc File chrome/browser/extensions/api/dial/dial_api.cc (right): https://codereview.chromium.org/2668383004/diff/1/chrome/browser/extensions/api/dial/dial_api.cc#newcode241 chrome/browser/extensions/api/dial/dial_api.cc:241: void ...
3 years, 10 months ago (2017-02-02 20:27:32 UTC) #5
imcheng
On 2017/02/02 20:24:42, mark a. foltz wrote: > On 2017/02/02 at 20:03:54, imcheng wrote: > ...
3 years, 10 months ago (2017-02-02 20:35:51 UTC) #6
imcheng
https://codereview.chromium.org/2668383004/diff/1/chrome/browser/extensions/api/dial/dial_api.cc File chrome/browser/extensions/api/dial/dial_api.cc (right): https://codereview.chromium.org/2668383004/diff/1/chrome/browser/extensions/api/dial/dial_api.cc#newcode241 chrome/browser/extensions/api/dial/dial_api.cc:241: void DialFetchDeviceDescriptionFunction::OnFetchComplete( On 2017/02/02 20:27:32, mark a. foltz wrote: ...
3 years, 10 months ago (2017-02-02 20:44:31 UTC) #7
mark a. foltz
On 2017/02/02 at 20:35:51, imcheng wrote: > On 2017/02/02 20:24:42, mark a. foltz wrote: > ...
3 years, 10 months ago (2017-02-02 21:40:13 UTC) #10
imcheng
On 2017/02/02 21:40:13, mark a. foltz wrote: > On 2017/02/02 at 20:35:51, imcheng wrote: > ...
3 years, 10 months ago (2017-02-02 21:50:50 UTC) #13
mark a. foltz
On 2017/02/02 at 21:50:50, imcheng wrote: > On 2017/02/02 21:40:13, mark a. foltz wrote: > ...
3 years, 10 months ago (2017-02-02 22:05:02 UTC) #14
imcheng
Ok. Indeed it can be problematic during shutdown. I will land this for now.
3 years, 10 months ago (2017-02-02 22:13:10 UTC) #15
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/2668383004/20001
3 years, 10 months ago (2017-02-02 22:13:47 UTC) #18
commit-bot: I haz the power
3 years, 10 months ago (2017-02-02 22:20:52 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/d8033dadec98c7c2f4c407f89c12...

Powered by Google App Engine
This is Rietveld 408576698