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

Issue 159763004: Eliminate potential for flaky crash in BCKSFactory::SetTestingFactory(). (Closed)

Created:
6 years, 10 months ago by blundell
Modified:
6 years, 10 months ago
Reviewers:
Elliot Glaysher, erg
CC:
chromium-reviews
Visibility:
Public.

Description

Eliminate potential for flaky crash in BCKSFactory::SetTestingFactory(). BCKSFactory::SetTestingFactory() calls BCKSFactory::BrowserContextShutdown(), which a BCKSFactory subclass may override to perform operations that result in BrowserContextDependencyManager::AssertBrowserContextWasntDestroyed() being called (e.g., BCKSFactory::GetServiceForContext()). When used with TestingProfile::Builder, BCKSFactory::SetTestingFactory() is called *before* the TestingProfile calls BrowserContextDependencyManager::CreateBrowserContextServicesForTest(). These facts set up the potential for a flaky crash: if the BrowserContext instance being used is at the same address as one that had been used in a previous test, then the call to AssertBrowserContextWasntDestroyed() will raise an error. This CL eliminates the potential for that crash by explicitly informing BrowserContextDependencyManager that the BrowserContext instance being used in BCKSFactory::SetTestingFactory() is live. NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251336

Patch Set 1 #

Total comments: 2

Patch Set 2 : Response to review #

Patch Set 3 : Fix compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -11 lines) Patch
M components/browser_context_keyed_service/browser_context_dependency_manager.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M components/browser_context_keyed_service/browser_context_dependency_manager.cc View 1 2 chunks +6 lines, -5 lines 0 comments Download
M components/browser_context_keyed_service/browser_context_keyed_base_factory.h View 2 chunks +6 lines, -6 lines 0 comments Download
M components/browser_context_keyed_service/browser_context_keyed_service_factory.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
blundell
Elliot, Could you take a look? The other solution I thought of was to create ...
6 years, 10 months ago (2014-02-11 16:47:45 UTC) #1
blundell
Ping :).
6 years, 10 months ago (2014-02-13 14:53:56 UTC) #2
Elliot Glaysher
lgtm https://codereview.chromium.org/159763004/diff/1/components/browser_context_keyed_service/browser_context_dependency_manager.cc File components/browser_context_keyed_service/browser_context_dependency_manager.cc (right): https://codereview.chromium.org/159763004/diff/1/components/browser_context_keyed_service/browser_context_dependency_manager.cc#newcode77 components/browser_context_keyed_service/browser_context_dependency_manager.cc:77: // at 0xWhatever. The only thing I can ...
6 years, 10 months ago (2014-02-13 17:23:53 UTC) #3
blundell
Thanks! https://codereview.chromium.org/159763004/diff/1/components/browser_context_keyed_service/browser_context_dependency_manager.cc File components/browser_context_keyed_service/browser_context_dependency_manager.cc (right): https://codereview.chromium.org/159763004/diff/1/components/browser_context_keyed_service/browser_context_dependency_manager.cc#newcode77 components/browser_context_keyed_service/browser_context_dependency_manager.cc:77: // at 0xWhatever. On 2014/02/13 17:23:53, Elliot Glaysher ...
6 years, 10 months ago (2014-02-13 21:45:40 UTC) #4
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 10 months ago (2014-02-13 21:45:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/159763004/70001
6 years, 10 months ago (2014-02-13 21:49:25 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 22:21:06 UTC) #7
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) app_list_unittests, cacheinvalidation_unittests, cc_unittests, check_deps, check_deps2git, chromedriver_unittests, ...
6 years, 10 months ago (2014-02-13 22:21:07 UTC) #8
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 10 months ago (2014-02-14 09:05:33 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/159763004/350001
6 years, 10 months ago (2014-02-14 09:05:58 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 10:28:51 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel
6 years, 10 months ago (2014-02-14 10:28:52 UTC) #12
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 10 months ago (2014-02-14 10:51:56 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/159763004/350001
6 years, 10 months ago (2014-02-14 10:52:13 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 10:52:30 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel
6 years, 10 months ago (2014-02-14 10:52:30 UTC) #16
blundell
The CQ bit was checked by blundell@chromium.org
6 years, 10 months ago (2014-02-14 11:01:50 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/blundell@chromium.org/159763004/350001
6 years, 10 months ago (2014-02-14 11:02:19 UTC) #18
commit-bot: I haz the power
6 years, 10 months ago (2014-02-14 15:33:54 UTC) #19
Message was sent while issue was closed.
Change committed as 251336

Powered by Google App Engine
This is Rietveld 408576698