New issue
Advanced search Search tips

Issue 827201 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Replace base::MessageLoop::DestructionObserver with base::BindToCurrentSequence

Project Member Reported by gab@chromium.org, Mar 29 2018

Issue description

Some objects need to bind their lifetime to the underlying sequence. Currently this is the main use case of MessageLoop::DestructionObserver but tying this to an explicit MessageLoop is unfortunate.

The next best thing today is binding lifetime to the sequence through a SequenceLocalStorageSlot<std::unique_ptr<>> but that's ugly to read and results in using many slots for the purpose of bindings which never need to Get().

base::BindToCurrentSequence would be backed by a SequenceLocalStorageSlot<std::vector<std::unique_ptr<>>> and use a single slot for everything that needs to hand its lifetime to the sequence it runs on.

(this is a vision but I'm not actively working on it at this time)
 
Status: Assigned (was: Available)

Sign in to add a comment