New issue
Advanced search Search tips

Issue 918039 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Thread::WaitUntilThreadStarted shouldn't allow base sync primitives

Project Member Reported by etiennep@chromium.org, Dec 27

Issue description

Thread::WaitUntilThreadStarted is instantiating it's own ScopedAllowBaseSyncPrimitivesOutsideBlockingScope.
This blindly allow anyone using this class to block.
Instead, the callers would need to provide the allowance.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 27

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

commit 1cef3cd9dee465bae03dfce306fbe0d1d0a94b05
Author: Etienne Pierre-doray <etiennep@chromium.org>
Date: Thu Dec 27 22:59:34 2018

[TaskScheduler]: Fix thread restriction in Thread::WaitUntilThreadStarted.

Thread::WaitUntilThreadStarted was incorrectly marked
ScopedAllowBaseSyncPrimitivesForTesting. Since it's used outside testing,
it is now ScopedAllowBaseSyncPrimitivesOutsideBlockingScope with a bug
to document it needs fixing.

Bug: 918039
Change-Id: Ifdd1bbfd651324021e57c1bdb040e5ba95f3864d
Reviewed-on: https://chromium-review.googlesource.com/c/1391717
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619084}
[modify] https://crrev.com/1cef3cd9dee465bae03dfce306fbe0d1d0a94b05/base/threading/thread.cc
[modify] https://crrev.com/1cef3cd9dee465bae03dfce306fbe0d1d0a94b05/base/threading/thread_restrictions.h

Sign in to add a comment