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

Issue 2380683008: Fix resource leak on extension window closing. (Closed)

Created:
4 years, 2 months ago by hidehiko
Modified:
4 years, 2 months ago
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, alemate+watch_chromium.org, yusukes+watch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix resource leak on extension window closing. The ARC support extension should be unloaded on window closed. However, it is not, because the port connected to Chrome is kept. In such a case, background page is kept alive so that the extension will not be unloaded. This CL closes the port so that extension is unloaded. Also, the "close" related messaging across ArcAuthService, ArcSupportHost and extension's background.js is slightly cleaned up to remove the unnecessary/unused code. It could be as a preparation of fixing dependencies, too. BUG=b/31079732, 651838 TEST=Ran on device. Ran unittests. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/824e668590c607e39ee4d8620de32016a920f2c2 Cr-Commit-Position: refs/heads/master@{#422196}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -59 lines) Patch
M chrome/browser/chromeos/arc/arc_auth_service.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/arc/arc_support_host.h View 1 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_support_host.cc View 4 chunks +22 lines, -13 lines 0 comments Download
M chrome/browser/resources/chromeos/arc_support/background.js View 7 chunks +16 lines, -45 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
hidehiko
PTAL.
4 years, 2 months ago (2016-09-30 15:05:37 UTC) #8
Luis Héctor Chávez
https://codereview.chromium.org/2380683008/diff/1/chrome/browser/chromeos/arc/arc_support_host.cc File chrome/browser/chromeos/arc/arc_support_host.cc (right): https://codereview.chromium.org/2380683008/diff/1/chrome/browser/chromeos/arc/arc_support_host.cc#newcode302 chrome/browser/chromeos/arc/arc_support_host.cc:302: void ArcSupportHost::OnOptInUIClose() { Given that this and Close() are ...
4 years, 2 months ago (2016-09-30 15:14:14 UTC) #9
hidehiko
Thank you for quick reply! https://codereview.chromium.org/2380683008/diff/1/chrome/browser/chromeos/arc/arc_support_host.cc File chrome/browser/chromeos/arc/arc_support_host.cc (right): https://codereview.chromium.org/2380683008/diff/1/chrome/browser/chromeos/arc/arc_support_host.cc#newcode302 chrome/browser/chromeos/arc/arc_support_host.cc:302: void ArcSupportHost::OnOptInUIClose() { On ...
4 years, 2 months ago (2016-09-30 15:21:25 UTC) #10
Luis Héctor Chávez
lgtm with a TODO in that case :)
4 years, 2 months ago (2016-09-30 15:25:35 UTC) #11
xiyuan
lgtm
4 years, 2 months ago (2016-09-30 16:56:52 UTC) #12
hidehiko
Thank you for review. Done to add explicit TODO. Submitting.
4 years, 2 months ago (2016-09-30 17:46:13 UTC) #13
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/2380683008/20001
4 years, 2 months ago (2016-09-30 17:46:52 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-09-30 20:04:09 UTC) #18
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 20:06:55 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/824e668590c607e39ee4d8620de32016a920f2c2
Cr-Commit-Position: refs/heads/master@{#422196}

Powered by Google App Engine
This is Rietveld 408576698