New issue
Advanced search Search tips

Issue 748755 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DCHECK_CURRENTLY_ON misleading in chrome_signin_helper_unittest.cc

Project Member Reported by btolsch@chromium.org, Jul 25 2017

Issue description

Version: 62.0.3167.0

DCHECK_CURRENTLY_ON will succeed for any thread label when run with TestBrowserThreadBundle with no additional threads because TestBrowserThreadBundle runs everything in one thread and MessageLoop.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Aug 9 2017

Cc: droger@chromium.org ew...@chromium.org jlebel@chromium.org bsazonov@chromium.org msarda@chromium.org
Status: Available (was: Untriaged)
--Chrome Identity automated triaging--

This bug is Untriaged and has gone for two weeks without any activity, so it is being moved to Available. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 2 by msarda@chromium.org, Aug 16 2017

btolsch@chromium.org: Why is this bug associated with component Services > Sign in? 

Comment 3 by droger@chromium.org, Aug 16 2017

msarda: this is in chrome_signin_helper_unittest, which is signin code.

I am really not convinced that this is true though:
"DCHECK_CURRENTLY_ON will succeed for any thread label"

Comment 4 by droger@chromium.org, Aug 16 2017

Cc: -droger@chromium.org
Owner: droger@chromium.org
Status: Assigned (was: Available)

Comment 5 by droger@chromium.org, Aug 16 2017

I tried and indeed it seems that these DCHECKs don't fire in tests.

This is a recent change right? I remember spending a lot of time writing this test because of this kind of assertions, and had to setup the test to run on two threads to avoid DCHECKs all over the place. But now it seems I can just run all the IO related code on the UI thread and nothing complains.

Comment 6 by droger@chromium.org, Aug 16 2017

Status: Started (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ce4a4f9650be43d6f81bf2068cd59ceb15ce46c7

commit ce4a4f9650be43d6f81bf2068cd59ceb15ce46c7
Author: David Roger <droger@chromium.org>
Date: Thu Aug 17 15:07:55 2017

[signin] Simplify threading in ChromeSigninHelper unit test

This CL removes all the thread-hopping from the test, because
it is unnecessary.
Everything that was done on the IO thread is now done on the main
thread, and all the synchronization code is removed.

Bug:  748755 
Change-Id: I887818304e7535a77b6810ae2bda7d6e9a005479
Reviewed-on: https://chromium-review.googlesource.com/616725
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495175}
[modify] https://crrev.com/ce4a4f9650be43d6f81bf2068cd59ceb15ce46c7/chrome/browser/signin/chrome_signin_helper_unittest.cc

Comment 8 by droger@chromium.org, Aug 18 2017

Status: Fixed (was: Started)

Sign in to add a comment