0

dbus: Add crash keys for ObjextProxy::OnCallMethod()

To identify the caller.

BUG=397080280
TEST=dbus_unittests

Change-Id: Icce92536ede9d150a0d9c02a326dadefca2ee4fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6345351
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1431831}
This commit is contained in:
Ryo Hashimoto
2025-03-12 16:46:27 -07:00
committed by Chromium LUCI CQ
parent 13aac44fc6
commit b8904e0f51

@ -11,6 +11,7 @@
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/debug/alias.h"
#include "base/debug/crash_logging.h"
#include "base/debug/leak_annotations.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
@ -594,6 +595,10 @@ void ObjectProxy::OnCallMethod(const std::string& interface_name,
ResponseCallback response_callback,
Response* response,
ErrorResponse* error_response) {
// Add crash keys to debug crbug.com/397080280
SCOPED_CRASH_KEY_STRING32("ObjectProxy", "interface_name", interface_name);
SCOPED_CRASH_KEY_STRING32("ObjectProxy", "method_name", method_name);
if (response) {
// Method call was successful.
std::move(response_callback).Run(response);