Have...
Have ExtensionWebRequestApiTest.WebRequestApiDoesNotCrashOnErrorAfterProfileDestroyed better represent task ordering in production. Work done in the context of crbug.com/661143 uncovered a problem in this test that should be fixed before going forward. The problem is present regardless of HistoryService's task runner behavior but is currently hidden by the fact that HistoryService joins its backend_task_runner on destruction. Like explained in the comment there should not be any tasks pending when we reach Profile destruction because otherwise it does not represent the shutdown sequence present in the browser. In this particular case this presented itself in the form of a use after free of the profile object by callbacks of tasks still running on the ThreadPool. This test is the only test in the codebase that destroys a profile using DestroyProfileWhenAppropriate directly (apart from tests testing the function itself). We will be able to fix other tests seamlessly by improving as it uses a function that is not only for tests to achieve a similar purpose. KeyedServiceFactory: :SetTestingFactory but this test has to be fixed directly Change-Id: Iab7020b9c33091b2c997acce6bcbe2ac225da0f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879202Reviewed-by:Dominic Battré <battre@chromium.org> Commit-Queue: Oliver Li <olivierli@chromium.org> Cr-Commit-Position: refs/heads/master@{#709492}
Showing
Please register or sign in to comment