diff --git a/media/mojo/clients/mojo_codec_factory.cc b/media/mojo/clients/mojo_codec_factory.cc index 0dfe148f7bbea..3cc739df460c4 100644 --- a/media/mojo/clients/mojo_codec_factory.cc +++ b/media/mojo/clients/mojo_codec_factory.cc @@ -7,8 +7,10 @@ #include #include +#include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/notimplemented.h" +#include "base/threading/platform_thread.h" #include "base/task/bind_post_task.h" #include "base/task/sequenced_task_runner.h" #include "media/base/decoder.h" @@ -119,12 +121,20 @@ void MojoCodecFactory::NotifyDecoderSupportKnown(base::OnceClosure callback) { void MojoCodecFactory::NotifyEncoderSupportKnown(base::OnceClosure callback) { base::AutoLock lock(supported_profiles_lock_); + LOG(ERROR) << "POCTRACE NotifyEncoderSupportKnown tid=" + << base::PlatformThread::CurrentId() + << " name=" << base::PlatformThread::GetName() + << " is_notified=" << encoder_support_notifier_.is_notified() + << " runner=" << base::SequencedTaskRunner::GetCurrentDefault().get(); encoder_support_notifier_.Register( base::BindPostTaskToCurrentDefault(std::move(callback))); } void MojoCodecFactory::OnChannelTokenReady(const base::UnguessableToken& token, int32_t route_id) { + LOG(ERROR) << "POCTRACE OnChannelTokenReady tid=" + << base::PlatformThread::CurrentId() + << " name=" << base::PlatformThread::GetName(); base::AutoLock lock(supported_profiles_lock_); channel_token_ = token; route_id_ = route_id; @@ -148,6 +158,10 @@ void MojoCodecFactory::Notifier::Register(base::OnceClosure callback) { void MojoCodecFactory::Notifier::Notify() { DCHECK(!is_notified_); + LOG(ERROR) << "POCTRACE Notifier::Notify tid=" + << base::PlatformThread::CurrentId() + << " name=" << base::PlatformThread::GetName() + << " ncb=" << callbacks_.size(); is_notified_ = true; while (!callbacks_.empty()) { std::move(callbacks_.back()).Run(); @@ -170,6 +184,9 @@ void MojoCodecFactory::OnGetSupportedDecoderConfigs() { } void MojoCodecFactory::OnEncoderSupportFailed() { + LOG(ERROR) << "POCTRACE OnEncoderSupportFailed tid=" + << base::PlatformThread::CurrentId() + << " name=" << base::PlatformThread::GetName(); base::AutoLock lock(supported_profiles_lock_); if (encoder_support_notifier_.is_notified()) { return; @@ -180,6 +197,9 @@ void MojoCodecFactory::OnEncoderSupportFailed() { void MojoCodecFactory::OnGetVideoEncodeAcceleratorSupportedProfiles( const VideoEncodeAccelerator::SupportedProfiles& supported_profiles) { + LOG(ERROR) << "POCTRACE OnGetVEASupportedProfiles tid=" + << base::PlatformThread::CurrentId() + << " name=" << base::PlatformThread::GetName(); base::AutoLock lock(supported_profiles_lock_); supported_vea_profiles_ = supported_profiles; if (IsEncoderReady()) { diff --git a/third_party/blink/renderer/platform/heap/heap_barrier_callback.h b/third_party/blink/renderer/platform/heap/heap_barrier_callback.h index 54c8c24ecc12e..74fc51a4e686e 100644 --- a/third_party/blink/renderer/platform/heap/heap_barrier_callback.h +++ b/third_party/blink/renderer/platform/heap/heap_barrier_callback.h @@ -17,6 +17,8 @@ #include "base/functional/callback_helpers.h" #include "base/notreached.h" #include "base/thread_annotations.h" +#include "base/logging.h" +#include "base/threading/platform_thread.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h" #include "third_party/blink/renderer/platform/heap/cross_thread_handle.h" @@ -34,8 +36,22 @@ class BarrierCallbackInfo { MakeGarbageCollected>>())), done_callback_(std::move(done_callback)) { results_.GetOnCreationThread()->reserve(num_callbacks); + creation_tid_ = base::PlatformThread::CurrentId(); } + ~BarrierCallbackInfo() { + auto tid = base::PlatformThread::CurrentId(); + if (tid != creation_tid_) { + LOG(ERROR) << "POCTRACE BarrierCallbackInfo DTOR tid=" << tid + << " name=" << base::PlatformThread::GetName() + << " ctor_tid=" << creation_tid_ + << " done_cb_live=" << !!done_callback_ + << " *** OFF-THREAD ***"; + } + } + + base::PlatformThreadId creation_tid_; + void Run(T* t) { DCHECK_NE(num_callbacks_left_, 0U); results_.GetOnCreationThread()->push_back(std::move(t));