Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 342723002: Repairs crash in RTreeBase::Node::LeastAreaEnlargement (Closed)

Created:
6 years, 6 months ago by luken
Modified:
6 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, ben+views_chromium.org, tdanderson+views_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Repairs crash in RTreeBase::Node::LeastAreaEnlargement This CL was originally uploaded at https://codereview.chromium.org/269513002 but was reverted due to a high number of crash reports on Windows. The issue was that RTree::Insert() would remove duplicate nodes before re-inserting them, but didn't handle the corner case where the root node would end up as a non-leaf node with only one child. RTree::Remove() did the right thing in this case, which is to remove the root and replace it with its solitary child, but RTree::Insert() did not. This lead to a situation with invalid trees being created that would ultimately lead to a crash on a subsequent call to RTree::Insert(). A short unit test that reproduced the crash is included. BUG=384736 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278227

Patch Set 1 : original readability patch #

Patch Set 2 : crash fix and test added #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1780 lines, -1525 lines) Patch
M ui/gfx/geometry/r_tree.h View 1 2 chunks +143 lines, -257 lines 0 comments Download
D ui/gfx/geometry/r_tree.cc View 1 chunk +0 lines, -750 lines 0 comments Download
A ui/gfx/geometry/r_tree_base.h View 1 chunk +309 lines, -0 lines 0 comments Download
A ui/gfx/geometry/r_tree_base.cc View 1 chunk +658 lines, -0 lines 0 comments Download
M ui/gfx/geometry/r_tree_unittest.cc View 1 14 chunks +654 lines, -506 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/view.h View 3 chunks +6 lines, -4 lines 0 comments Download
M ui/views/view.cc View 6 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
luken
re-uploaded patch with original reverted patch first, so you can see the diff.
6 years, 6 months ago (2014-06-18 16:47:33 UTC) #1
sky
So much easier to see what actually changed. LGTM
6 years, 6 months ago (2014-06-18 17:24:09 UTC) #2
luken
The CQ bit was checked by luken@chromium.org
6 years, 6 months ago (2014-06-18 17:25:24 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/luken@chromium.org/342723002/20001
6 years, 6 months ago (2014-06-18 17:26:18 UTC) #4
commit-bot: I haz the power
6 years, 6 months ago (2014-06-19 01:30:05 UTC) #5
Message was sent while issue was closed.
Change committed as 278227

Powered by Google App Engine
This is Rietveld 408576698