commit | 21576dbba343f81c6b7c02221ffa11542ffbae72 | [log] [tgz] |
---|---|---|
author | David Bokan <bokan@chromium.org> | Thu Feb 07 21:57:32 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Feb 07 21:57:32 2019 |
tree | 537cc33515ff40bc0656949509826b7e36919a13 | |
parent | c7932a5401fd950bacfb01a2d3f88999f36cb3f0 [diff] |
Fix nullptr scrollbar crash Not sure how this can happen. ScrollbarsFor somehow returns a nullptr in the ScrollbarSet. This must mean ToScrollbarLayer returns nullptr. This method returns nullptr in the base and this in the ScrollbarLayerImplBase override. Therefore the LayerToId muse be returning a non-scrollbar layer. The only time we add anything to element_id_to_scrollbar_layer_ids_ though is from LTI::RegisterScrollbar which is necessarily a scrollbar layer. I think this means the Layer with the scrollbar layer's ID at some point changes to a different layer. The ID-to-Layer mapping is cleared when a layer is destroyed and the scrollbar layer clears the element_id_to_scrollbar_layer_ids_ mapping in its destructor so I'm speculating that we might be registering a new non-scrollbar layer with the same id. I've converted the DCHECK to a CHECK at that location to see if it comes back with any crashes from the wild. Bug: 924068 Change-Id: I9bb15812aeda0a2c92d2547a52af9fbdbacc65b0 Reviewed-on: https://chromium-review.googlesource.com/c/1435686 Reviewed-by: Robert Flack <flackr@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#630059}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .