Skip to content

Commit

Permalink
Update h5vcc_system.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
gbournou authored May 18, 2024
1 parent 5fa6773 commit e8ac73b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cobalt/h5vcc/h5vcc_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ H5vccSystem::H5vccSystem(
)
:
#endif
task_runner_(base::SequencedTaskRunner::GetCurrentDefault()),
task_runner_(base::ThreadTaskRunnerHandle::Get()),
ifa_extension_(static_cast<const StarboardExtensionIfaApi*>(
SbSystemGetExtension(kStarboardExtensionIfaName))) {
#if defined(COBALT_ENABLE_EXTENDED_IFA)
Expand Down Expand Up @@ -150,14 +150,14 @@ std::string H5vccSystem::tracking_authorization_status() const {

void H5vccSystem::ReceiveTrackingAuthorizationComplete() {
// May be called by another thread.
if (!task_runner_->RunsTasksInCurrentSequence()) {
if (!task_runner_->BelongsToCurrentThread()) {
task_runner_->PostTask(
FROM_HERE,
base::Bind(&H5vccSystem::ReceiveTrackingAuthorizationComplete,
base::Unretained(this)));
return;
}
DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK(task_runner_->BelongsToCurrentThread());

// Mark all promises complete and release the references.
for (auto& promise : request_tracking_authorization_promises_) {
Expand Down

0 comments on commit e8ac73b

Please sign in to comment.