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

Issue 118043003: Fix app_shell shutdown crash due to BrowserContextKeyedServices (Closed)

Created:
7 years ago by James Cook
Modified:
6 years, 11 months ago
Reviewers:
xiyuan, Yoyo Zhou, tbarzic
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, James Su, chrome-apps-syd-reviews_chromium.org, tfarina, haitaol+watch_chromium.org, chromium-apps-reviews_chromium.org, rsimha+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

Fix app_shell shutdown crash due to BrowserContextKeyedServices * Create ExtensionSystem and register its dependencies from the ExtensionsBrowserClient interface. * Create and tear down BrowserContextKeyedServices using the dependency manager like you're supposed to do it. * Don't register AppLoaderServiceFactory - we don't use it anymore. * Remove the "custom instance" code to ExtensionSystem::Get() - it was kind of hacky. BUG=none TEST=Launch app_shell then close the window. No crash. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244013

Patch Set 1 #

Patch Set 2 : delegate out ExtensionSystem creation (shutdown_crash) #

Total comments: 2

Patch Set 3 : review comments (shutdown_crash) #

Patch Set 4 : Fix FileSystem tests (shutdown_crash) #

Total comments: 4

Patch Set 5 : cleanup (shutdown_crash) #

Total comments: 1

Patch Set 6 : ScopedFactoryForTest (shutdown_crash) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -91 lines) Patch
M apps/shell/shell_browser_context.cc View 1 chunk +4 lines, -15 lines 0 comments Download
M apps/shell/shell_browser_main_parts.h View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M apps/shell/shell_browser_main_parts.cc View 1 2 5 chunks +23 lines, -18 lines 0 comments Download
M apps/shell/shell_extensions_browser_client.h View 1 2 3 chunks +9 lines, -6 lines 0 comments Download
M apps/shell/shell_extensions_browser_client.cc View 1 2 3 chunks +19 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_integration_service.h View 1 2 3 4 5 3 chunks +14 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/drive/drive_integration_service.cc View 1 2 3 4 5 4 chunks +14 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc View 1 2 3 4 5 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/file_manager/file_manager_browsertest.cc View 1 2 3 4 5 3 chunks +12 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc View 1 2 3 2 chunks +12 lines, -5 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.cc View 1 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_system_factory.h View 1 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_system_factory.cc View 1 2 3 4 2 chunks +10 lines, -14 lines 0 comments Download
M extensions/browser/extensions_browser_client.h View 1 3 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
James Cook
yoz, PTAL
7 years ago (2013-12-21 00:10:45 UTC) #1
Yoyo Zhou
This approach feels too hacky to me. It seems like we're solving the BCKS dependency ...
7 years ago (2013-12-21 00:49:05 UTC) #2
James Cook
On 2013/12/21 00:49:05, Yoyo Zhou wrote: > This approach feels too hacky to me. It ...
7 years ago (2013-12-21 05:05:21 UTC) #3
Yoyo Zhou
On 2013/12/21 05:05:21, James Cook wrote: > On 2013/12/21 00:49:05, Yoyo Zhou wrote: > > ...
6 years, 11 months ago (2014-01-07 06:19:55 UTC) #4
James Cook
yoz, please take another look This removes the custom_instance_ hack in favor of moving most ...
6 years, 11 months ago (2014-01-08 00:28:02 UTC) #5
Yoyo Zhou
LGTM https://chromiumcodereview.appspot.com/118043003/diff/190001/apps/shell/shell_browser_main_parts.cc File apps/shell/shell_browser_main_parts.cc (right): https://chromiumcodereview.appspot.com/118043003/diff/190001/apps/shell/shell_browser_main_parts.cc#newcode41 apps/shell/shell_browser_main_parts.cc:41: extensions::ExtensionPrefsFactory::GetInstance(); Is there some reason this can't be ...
6 years, 11 months ago (2014-01-08 02:29:42 UTC) #6
James Cook
https://codereview.chromium.org/118043003/diff/190001/apps/shell/shell_browser_main_parts.cc File apps/shell/shell_browser_main_parts.cc (right): https://codereview.chromium.org/118043003/diff/190001/apps/shell/shell_browser_main_parts.cc#newcode41 apps/shell/shell_browser_main_parts.cc:41: extensions::ExtensionPrefsFactory::GetInstance(); On 2014/01/08 02:29:42, Yoyo Zhou wrote: > Is ...
6 years, 11 months ago (2014-01-08 17:37:02 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/118043003/280001
6 years, 11 months ago (2014-01-08 17:38:09 UTC) #8
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=211391
6 years, 11 months ago (2014-01-08 19:30:44 UTC) #9
James Cook
tbarzic, PTAL at chrome/browser/chromeos/* Deferring the factory instance creation seems to have fixed these tests.
6 years, 11 months ago (2014-01-09 01:23:35 UTC) #10
tbarzic
c/b/cros lgtm https://codereview.chromium.org/118043003/diff/580001/chrome/browser/chromeos/drive/drive_integration_service.h File chrome/browser/chromeos/drive/drive_integration_service.h (right): https://codereview.chromium.org/118043003/diff/580001/chrome/browser/chromeos/drive/drive_integration_service.h#newcode224 chrome/browser/chromeos/drive/drive_integration_service.h:224: // (and all its dependent factories) until ...
6 years, 11 months ago (2014-01-09 01:58:24 UTC) #11
James Cook
xiyuan, can I get OWNERS for c/b/chromeos ? https://codereview.chromium.org/118043003/diff/580001/chrome/browser/chromeos/drive/drive_integration_service.h File chrome/browser/chromeos/drive/drive_integration_service.h (right): https://codereview.chromium.org/118043003/diff/580001/chrome/browser/chromeos/drive/drive_integration_service.h#newcode224 chrome/browser/chromeos/drive/drive_integration_service.h:224: // ...
6 years, 11 months ago (2014-01-09 17:32:19 UTC) #12
xiyuan
c/b/chromeos LGTM https://codereview.chromium.org/118043003/diff/750001/chrome/browser/chromeos/drive/drive_integration_service.h File chrome/browser/chromeos/drive/drive_integration_service.h (right): https://codereview.chromium.org/118043003/diff/750001/chrome/browser/chromeos/drive/drive_integration_service.h#newcode213 chrome/browser/chromeos/drive/drive_integration_service.h:213: static void SetFactoryForTest(FactoryCallback* factory_for_test); nit: How about ...
6 years, 11 months ago (2014-01-09 17:53:21 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/118043003/840001
6 years, 11 months ago (2014-01-09 18:39:52 UTC) #14
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=244239
6 years, 11 months ago (2014-01-09 21:04:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/118043003/840001
6 years, 11 months ago (2014-01-09 21:35:41 UTC) #16
commit-bot: I haz the power
6 years, 11 months ago (2014-01-09 23:18:37 UTC) #17
Message was sent while issue was closed.
Change committed as 244013

Powered by Google App Engine
This is Rietveld 408576698