Commit 6ad348f8 authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

[wakelock] Add temporary logging for debugging

This change adds temporary info-level log messages around code called
when a wake lock is released to debug an Android-specific failure which
is not reproducible on a local build.

Bug: 1064550
No-Presubmit: true
Change-Id: I7bb461c0407857c93792511c0f0a2d33e9000bb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2147926
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarRaphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758750}
parent 6564045c
...@@ -36,7 +36,9 @@ WakeLock::WakeLock(mojo::PendingReceiver<mojom::WakeLock> receiver, ...@@ -36,7 +36,9 @@ WakeLock::WakeLock(mojo::PendingReceiver<mojom::WakeLock> receiver,
&WakeLock::OnConnectionError, base::Unretained(this))); &WakeLock::OnConnectionError, base::Unretained(this)));
} }
WakeLock::~WakeLock() {} WakeLock::~WakeLock() {
LOG(INFO) << "Destroying WakeLock (browser side).";
}
void WakeLock::AddClient(mojo::PendingReceiver<mojom::WakeLock> receiver) { void WakeLock::AddClient(mojo::PendingReceiver<mojom::WakeLock> receiver) {
DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); DCHECK(main_task_runner_->RunsTasksInCurrentSequence());
......
...@@ -95,6 +95,7 @@ void WakeLockManager::ClearWakeLocks() { ...@@ -95,6 +95,7 @@ void WakeLockManager::ClearWakeLocks() {
} }
void WakeLockManager::OnWakeLockConnectionError() { void WakeLockManager::OnWakeLockConnectionError() {
LOG(INFO) << "Clearing wake locks on connection error.";
wake_lock_.reset(); wake_lock_.reset();
ClearWakeLocks(); ClearWakeLocks();
} }
......
...@@ -90,6 +90,7 @@ void WakeLockSentinel::DoRelease() { ...@@ -90,6 +90,7 @@ void WakeLockSentinel::DoRelease() {
if (!GetExecutionContext() || GetExecutionContext()->IsContextDestroyed()) if (!GetExecutionContext() || GetExecutionContext()->IsContextDestroyed())
return; return;
LOG(INFO) << "Dispatching release event.";
// 6. Queue a task to fire an event named "release" at lock. // 6. Queue a task to fire an event named "release" at lock.
DispatchEvent(*Event::Create(event_type_names::kRelease)); DispatchEvent(*Event::Create(event_type_names::kRelease));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment