New issue
Advanced search Search tips

Issue 812402 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Ensure that KeyedService factories don't leak between tests runs

Project Member Reported by msramek@chromium.org, Feb 14 2018

Issue description

Subclasses of BrowserContextKeyedServiceFactory are typically singletons. Most of them use base::Singleton to achieve this, but some of them were created as CR_DEFINE_STATIC_LOCAL. The latter approach is inadvisable, as it causes the factory to leak between subsequent browsertest testcases even if all Profile instances are destroyed and recreated.

See:

https://chromium-review.googlesource.com/c/chromium/src/+/897947
https://chromium-review.googlesource.com/c/chromium/src/+/897514

for discussion about issues this can cause.

Find a way to ensure that BrowserContextKeyedServiceFactory subclasses are designed in such a way that they are recreated in subsequent browsertest testcases.
 

Sign in to add a comment