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

Issue 20065004: Make AppShimHostManager a RefCountedThreadSafe. (Closed)

Created:
7 years, 5 months ago by jackhou1
Modified:
7 years, 3 months ago
Reviewers:
tapted, Nico
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Make AppShimHostManager a RefCountedThreadSafe. This prevents a crash when Chrome shuts down immediately and AppShimHostManager is destructed before InitOnFileThread is run. Note this means AppShimHostManager can stay around longer than BrowserProcessPlatformPart during initialization. BUG=242941 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=221580

Patch Set 1 #

Patch Set 2 : Sync and rebase #

Patch Set 3 : Sync and rebase #

Patch Set 4 : Sync and rebase #

Patch Set 5 : Sync and rebase #

Total comments: 2

Patch Set 6 : Address comment #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -13 lines) Patch
M apps/app_shim/app_shim_host_manager_mac.h View 1 chunk +5 lines, -3 lines 0 comments Download
M apps/app_shim/app_shim_host_manager_mac.mm View 2 chunks +2 lines, -4 lines 1 comment Download
M chrome/browser/browser_process_platform_part_mac.h View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/browser_process_platform_part_mac.mm View 1 2 3 4 5 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jackhou1
7 years, 5 months ago (2013-07-24 06:59:54 UTC) #1
tapted
This looks good.. but were you able to make a repro that could reliably tickle ...
7 years, 5 months ago (2013-07-24 07:32:26 UTC) #2
jackhou1
On 2013/07/24 07:32:26, tapted wrote: > This looks good.. but were you able to make ...
7 years, 3 months ago (2013-09-03 04:27:39 UTC) #3
tapted
On 2013/09/03 04:27:39, jackhou1 wrote: > On 2013/07/24 07:32:26, tapted wrote: > > This looks ...
7 years, 3 months ago (2013-09-03 06:49:06 UTC) #4
jackhou1
thakis, please review for OWNERS https://codereview.chromium.org/20065004/diff/12001/chrome/browser/browser_process_platform_part_mac.mm File chrome/browser/browser_process_platform_part_mac.mm (right): https://codereview.chromium.org/20065004/diff/12001/chrome/browser/browser_process_platform_part_mac.mm#newcode7 chrome/browser/browser_process_platform_part_mac.mm:7: #include "apps/app_shim/app_shim_host_manager_mac.h" On 2013/09/03 ...
7 years, 3 months ago (2013-09-04 01:24:11 UTC) #5
Nico
lgtm
7 years, 3 months ago (2013-09-04 15:38:23 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/20065004/19001
7 years, 3 months ago (2013-09-05 06:20:41 UTC) #7
commit-bot: I haz the power
Retried try job too often on ios_dbg_simulator for step(s) ui_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=ios_dbg_simulator&number=83074
7 years, 3 months ago (2013-09-05 06:57:53 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/20065004/19001
7 years, 3 months ago (2013-09-06 05:26:09 UTC) #9
commit-bot: I haz the power
Change committed as 221580
7 years, 3 months ago (2013-09-06 05:28:18 UTC) #10
tapted
7 years, 3 months ago (2013-09-09 21:48:35 UTC) #11
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/20065004/diff/19001/apps/app_shim/app_...
File apps/app_shim/app_shim_host_manager_mac.mm (right):

https://chromiumcodereview.appspot.com/20065004/diff/19001/apps/app_shim/app_...
apps/app_shim/app_shim_host_manager_mac.mm:32: BrowserThread::PostTask(
Ah, so since reference counts start from zero, this needs to be done after the
newly constructed object is assigned to the app_shim_host_manager_ member of
BrowserProcessPlatformPart. Some options are to make InitOnFileThread public, or
make a new Init() member function for
BrowserProcessPlatformPart::PreMainMessageLoopRun to call.

I'd probably go with essentially renaming this function to Init() and having a
constructor with an empty body. The empty constructor will still call default
initializers for data members, but I don't think we need to worry about
separating out the Init steps in ExtensionAppShimHandler() - the interesting
initialization there already waits for profile creation.

Powered by Google App Engine
This is Rietveld 408576698