Commit b1d6f80a authored by W. James MacLean's avatar W. James MacLean Committed by Commit Bot

Add DevTools check to CrashKeys for crbug.com/824774.

Record whether DevTools is currently active in CrashKeys.

Bug: 824774
Change-Id: I697bf892037c63216890d9d5f7ccc67e037f3b19
Reviewed-on: https://chromium-review.googlesource.com/986453
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546929}
parent bea9f37a
...@@ -1192,11 +1192,22 @@ void RenderWidgetHostInputEventRouter::DispatchTouchscreenGestureEvent( ...@@ -1192,11 +1192,22 @@ void RenderWidgetHostInputEventRouter::DispatchTouchscreenGestureEvent(
event.SetPositionInWidget(event.PositionInWidget() + event.SetPositionInWidget(event.PositionInWidget() +
touchscreen_gesture_target_.delta); touchscreen_gesture_target_.delta);
// Temporary logging for https://crbug.com/824774. // Temporary logging for https://crbug.com/824774.
// TODO(wjmaclean): Remove all this logging code once the issue is resolved.
static auto* target_ptr_key = base::debug::AllocateCrashKeyString( static auto* target_ptr_key = base::debug::AllocateCrashKeyString(
"touchscreen-gesture-target-ptr", base::debug::CrashKeySize::Size64); "touchscreen-gesture-target-ptr", base::debug::CrashKeySize::Size64);
base::debug::SetCrashKeyString( base::debug::SetCrashKeyString(
target_ptr_key, target_ptr_key,
base::StringPrintf("%p", touchscreen_gesture_target_.target)); base::StringPrintf("%p", touchscreen_gesture_target_.target));
// Issue 824772 is a potential cause for issue 824774. Report whether
// devtools is in use to investigate this possibility.
auto* contents = root_view->host()->delegate()->GetAsWebContents();
const bool have_devtools =
contents && DevToolsAgentHost::IsDebuggerAttached(contents);
static auto* devtools_key = base::debug::AllocateCrashKeyString(
"touchscreen-gesture-target-have-devtools",
base::debug::CrashKeySize::Size32);
base::debug::SetCrashKeyString(devtools_key, std::to_string(have_devtools));
// Crash in 824774 appears to happen on next line.
touchscreen_gesture_target_.target->ProcessGestureEvent(event, latency); touchscreen_gesture_target_.target->ProcessGestureEvent(event, latency);
} }
......
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