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

Issue 2863213004: ProcessManagerFactory: fix dependencies in ApiResourceManager, LazyBgndTaskFactory (Closed)

Created:
3 years, 7 months ago by Kevin M
Modified:
3 years, 7 months ago
Reviewers:
Devlin, benwells
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org, dcheng
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

ProcessManagerFactory: fix dependencies in ApiResourceManager, LazyBgndTaskFactory ProcessManagerFactory: add dependency on LazyBgndTaskFactory. The absence of a factory is causing some crashes on shutdown (see bug). Add service dependencies from ApiResourceManager to ExtensionRegistryFactory and ProcessManagerFactory. ApiResourceManager is holding scoped observer objects on those services. The observed objects must be alive when the observers are unregistered, otherwise a use after free condition may occur. Add template struct-based dependency registration system, necessary for supporting type inference using partial specialization. R=benwells@chromium.org BUG=716348 Review-Url: https://codereview.chromium.org/2863213004 Cr-Commit-Position: refs/heads/master@{#472495} Committed: https://chromium.googlesource.com/chromium/src/+/994885e87e81f4d513a81ff2730cb5a2a240793b

Patch Set 1 #

Patch Set 2 : Add missing dependencies from ApiResourceManager to ExtensionRegistryFactory, ProcessManagerFactory #

Total comments: 2

Patch Set 3 : add newline #

Patch Set 4 : devlin feedback #

Total comments: 5

Patch Set 5 : devlin feedback #

Total comments: 4

Patch Set 6 : explanation #

Patch Set 7 : more explanation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -13 lines) Patch
M extensions/browser/api/api_resource_manager.h View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M extensions/browser/browser_context_keyed_api_factory.h View 1 2 3 4 5 6 3 chunks +36 lines, -12 lines 0 comments Download
M extensions/browser/process_manager_factory.cc View 1 2 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 54 (24 generated)
Kevin M
3 years, 7 months ago (2017-05-06 00:07:38 UTC) #1
benwells
lgtm
3 years, 7 months ago (2017-05-06 05:01:57 UTC) #2
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/2863213004/1
3 years, 7 months ago (2017-05-08 17:07:28 UTC) #4
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/365119)
3 years, 7 months ago (2017-05-08 18:49:50 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/2863213004/1
3 years, 7 months ago (2017-05-09 18:34:59 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/366318) linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 7 months ago (2017-05-09 21:42:05 UTC) #10
Kevin M
benwells@, please take another look. asan detected a deletion ordering issue in ApiResourceManager relating to ...
3 years, 7 months ago (2017-05-09 23:10:04 UTC) #12
benwells
If this is just for the ApiResourceManager, can you add these dependencies just for that ...
3 years, 7 months ago (2017-05-10 16:00:23 UTC) #17
Kevin M
Yup, just for the ApiResourceManager. It has some implicit dependencies that need to be made ...
3 years, 7 months ago (2017-05-10 17:19:36 UTC) #18
Kevin M
Don't quite get your suggestion, though - I already had uploaded a patch which added ...
3 years, 7 months ago (2017-05-10 23:30:08 UTC) #19
benwells
On 2017/05/10 23:30:08, Kevin M wrote: > Don't quite get your suggestion, though - I ...
3 years, 7 months ago (2017-05-11 06:53:25 UTC) #20
Kevin M
+devlin Hey Devlin, The explicit specialization pattern recommended in browser_context_keyed_api_factory.h doesn't seem to work for ...
3 years, 7 months ago (2017-05-11 20:38:14 UTC) #22
Devlin
On 2017/05/11 20:38:14, Kevin M wrote: > +devlin > > Hey Devlin, > > The ...
3 years, 7 months ago (2017-05-12 19:26:58 UTC) #23
Kevin M
Yep, that worked. Smart!! I defined it as a parallel path to the existing factory ...
3 years, 7 months ago (2017-05-12 21:54:44 UTC) #24
Devlin
https://codereview.chromium.org/2863213004/diff/60001/extensions/browser/api/api_resource_manager.h File extensions/browser/api/api_resource_manager.h (right): https://codereview.chromium.org/2863213004/diff/60001/extensions/browser/api/api_resource_manager.h#newcode373 extensions/browser/api/api_resource_manager.h:373: BrowserContextKeyedAPIFactory<ApiResourceManager<T>>* factory) { Have you done an audit to ...
3 years, 7 months ago (2017-05-12 22:54:00 UTC) #28
Kevin M
https://codereview.chromium.org/2863213004/diff/60001/extensions/browser/api/api_resource_manager.h File extensions/browser/api/api_resource_manager.h (right): https://codereview.chromium.org/2863213004/diff/60001/extensions/browser/api/api_resource_manager.h#newcode373 extensions/browser/api/api_resource_manager.h:373: BrowserContextKeyedAPIFactory<ApiResourceManager<T>>* factory) { On 2017/05/12 22:53:59, Devlin (catching up) ...
3 years, 7 months ago (2017-05-15 18:09:04 UTC) #31
Devlin
Patch Set naming nit: Dana's not on this CL. :) https://codereview.chromium.org/2863213004/diff/60001/extensions/browser/browser_context_keyed_api_factory.h File extensions/browser/browser_context_keyed_api_factory.h (right): https://codereview.chromium.org/2863213004/diff/60001/extensions/browser/browser_context_keyed_api_factory.h#newcode120 ...
3 years, 7 months ago (2017-05-15 18:24:52 UTC) #32
Devlin
On 2017/05/15 18:24:52, Devlin (catching up) wrote: > Patch Set naming nit: Dana's not on ...
3 years, 7 months ago (2017-05-15 18:26:53 UTC) #33
Kevin M
I fixed the patch titles at the same time you were writing that reply. You ...
3 years, 7 months ago (2017-05-15 18:34:39 UTC) #34
Devlin
https://codereview.chromium.org/2863213004/diff/80001/extensions/browser/browser_context_keyed_api_factory.h File extensions/browser/browser_context_keyed_api_factory.h (right): https://codereview.chromium.org/2863213004/diff/80001/extensions/browser/browser_context_keyed_api_factory.h#newcode74 extensions/browser/browser_context_keyed_api_factory.h:74: // be placed in your .cc file. On 2017/05/15 ...
3 years, 7 months ago (2017-05-15 18:37:47 UTC) #35
Kevin M
https://codereview.chromium.org/2863213004/diff/80001/extensions/browser/browser_context_keyed_api_factory.h File extensions/browser/browser_context_keyed_api_factory.h (right): https://codereview.chromium.org/2863213004/diff/80001/extensions/browser/browser_context_keyed_api_factory.h#newcode74 extensions/browser/browser_context_keyed_api_factory.h:74: // be placed in your .cc file. On 2017/05/15 ...
3 years, 7 months ago (2017-05-15 18:43:01 UTC) #36
Devlin
LGTM!
3 years, 7 months ago (2017-05-15 20:24:27 UTC) #37
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/2863213004/120001
3 years, 7 months ago (2017-05-15 20:28:30 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/228860)
3 years, 7 months ago (2017-05-15 21:15:18 UTC) #42
benwells
On 2017/05/15 21:15:18, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 7 months ago (2017-05-16 06:42:38 UTC) #43
Kevin M
I can't reproduce the compile error on my Windows machine, so perhaps it's a transient ...
3 years, 7 months ago (2017-05-16 18:24:57 UTC) #44
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/2863213004/120001
3 years, 7 months ago (2017-05-16 18:26:22 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/428201)
3 years, 7 months ago (2017-05-16 21:41:17 UTC) #48
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/2863213004/120001
3 years, 7 months ago (2017-05-17 16:54:32 UTC) #51
commit-bot: I haz the power
3 years, 7 months ago (2017-05-17 18:10:26 UTC) #54
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/994885e87e81f4d513a81ff2730c...

Powered by Google App Engine
This is Rietveld 408576698