Commit ca453387 authored by David Bokan's avatar David Bokan Committed by Commit Bot

Fix scrollbar null-ptr crash

The crash is a SegFault at 0x1c which is consistent with
ScrollNode::user_scrollable_horizontal's position in ScrollNode.

This is a stop-gap to prevent crashing in stable. Once it's confirmed
and merged I'll investigate the underlying cause and real fix.

Bug: 924068
Change-Id: I7a613b945176d54116c15feaf7f5fdc91833735a
Reviewed-on: https://chromium-review.googlesource.com/c/1478373Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633829}
parent eeffd91a
...@@ -87,6 +87,12 @@ bool ScrollbarLayerImplBase::CanScrollOrientation() const { ...@@ -87,6 +87,12 @@ bool ScrollbarLayerImplBase::CanScrollOrientation() const {
const auto* scroll_node = const auto* scroll_node =
property_trees->scroll_tree.FindNodeFromElementId(scroll_element_id_); property_trees->scroll_tree.FindNodeFromElementId(scroll_element_id_);
DCHECK(scroll_node); DCHECK(scroll_node);
// TODO(bokan): Looks like we sometimes get here without a ScrollNode. It
// should be safe to just return false here (we don't use scroll_element_id_
// anywhere else) so we can merge the fix. Once merged, will investigate the
// underlying cause. https://crbug.com/924068.
if (!scroll_node)
return false;
if (orientation() == ScrollbarOrientation::HORIZONTAL) { if (orientation() == ScrollbarOrientation::HORIZONTAL) {
if (!scroll_node->user_scrollable_horizontal) if (!scroll_node->user_scrollable_horizontal)
......
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