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

Issue 10458045: Cleanup: Remove vector::at() calls in SimpleMenuModel. Do CHECKs instead. (Closed)

Created:
8 years, 6 months ago by Lei Zhang
Modified:
8 years, 6 months ago
Reviewers:
Peter Kasting, sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Cleanup: Remove vector::at() calls in SimpleMenuModel. Do CHECKs instead. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140139

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -14 lines) Patch
M ui/base/models/simple_menu_model.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/base/models/simple_menu_model.cc View 1 2 7 chunks +18 lines, -14 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Lei Zhang
8 years, 6 months ago (2012-05-30 21:56:30 UTC) #1
sky
On windows using the [] operator triggers a crash if out of bounds. Do we ...
8 years, 6 months ago (2012-05-30 22:57:33 UTC) #2
Lei Zhang
On 2012/05/30 22:57:33, sky wrote: > On windows using the [] operator triggers a crash ...
8 years, 6 months ago (2012-05-30 23:14:27 UTC) #3
Avi (use Gerrit)
On 2012/05/30 22:57:33, sky wrote: > On windows using the [] operator triggers a crash ...
8 years, 6 months ago (2012-05-30 23:20:36 UTC) #4
sky
Does this imply we should use at() every where? -Scott On Wed, May 30, 2012 ...
8 years, 6 months ago (2012-05-30 23:21:18 UTC) #5
Lei Zhang
That's what I'm trying to do here. I was looking at bug 123036, and I ...
8 years, 6 months ago (2012-05-30 23:25:22 UTC) #6
sky
I wasn't referring to just this code, but all of chrome? -Scott On Wed, May ...
8 years, 6 months ago (2012-05-30 23:46:56 UTC) #7
Lei Zhang
IMO, we should. According to the internal VectorBoundsChecking wiki page, even Valgrind does not always ...
8 years, 6 months ago (2012-05-31 00:19:29 UTC) #8
Peter Kasting
Do not use at() here or elsewhere. at() is both extremely uncommon and informally banned ...
8 years, 6 months ago (2012-05-31 00:28:17 UTC) #9
Lei Zhang
In that case, I'll convert them to CHECKs to preserve the existing behavior. See patch ...
8 years, 6 months ago (2012-05-31 03:55:32 UTC) #10
Peter Kasting
LGTM https://chromiumcodereview.appspot.com/10458045/diff/3/ui/base/models/simple_menu_model.cc File ui/base/models/simple_menu_model.cc (right): https://chromiumcodereview.appspot.com/10458045/diff/3/ui/base/models/simple_menu_model.cc#newcode354 ui/base/models/simple_menu_model.cc:354: void SimpleMenuModel::ValidateItemIndex(int index) const { Nit: If you ...
8 years, 6 months ago (2012-05-31 04:49:25 UTC) #11
Lei Zhang
https://chromiumcodereview.appspot.com/10458045/diff/3/ui/base/models/simple_menu_model.cc File ui/base/models/simple_menu_model.cc (right): https://chromiumcodereview.appspot.com/10458045/diff/3/ui/base/models/simple_menu_model.cc#newcode354 ui/base/models/simple_menu_model.cc:354: void SimpleMenuModel::ValidateItemIndex(int index) const { On 2012/05/31 04:49:25, Peter ...
8 years, 6 months ago (2012-05-31 06:22:05 UTC) #12
sky
LGTM
8 years, 6 months ago (2012-05-31 14:57:19 UTC) #13
tfarina
Please, also update the CL description and fill the BUG= line with the correspondent crbug.com/ ...
8 years, 6 months ago (2012-05-31 15:32:25 UTC) #14
Lei Zhang
On 2012/05/31 15:32:25, tfarina wrote: > Please, also update the CL description and fill the ...
8 years, 6 months ago (2012-05-31 17:07:03 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thestig@chromium.org/10458045/3003
8 years, 6 months ago (2012-05-31 17:08:27 UTC) #16
tfarina
On Thu, May 31, 2012 at 2:07 PM, <thestig@chromium.org> wrote: > On 2012/05/31 15:32:25, tfarina ...
8 years, 6 months ago (2012-05-31 17:13:36 UTC) #17
Lei Zhang
On 2012/05/31 17:13:36, tfarina wrote: > On Thu, May 31, 2012 at 2:07 PM, <mailto:thestig@chromium.org> ...
8 years, 6 months ago (2012-05-31 17:16:45 UTC) #18
Peter Kasting
I went ahead and updated the change title here to make sky happy :)
8 years, 6 months ago (2012-05-31 17:33:56 UTC) #19
tfarina
On Thu, May 31, 2012 at 2:33 PM, <pkasting@chromium.org> wrote: > I went ahead and ...
8 years, 6 months ago (2012-05-31 17:35:30 UTC) #20
commit-bot: I haz the power
Try job failure for 10458045-3003 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 6 months ago (2012-05-31 20:02:03 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thestig@chromium.org/10458045/3003
8 years, 6 months ago (2012-06-01 21:12:50 UTC) #22
commit-bot: I haz the power
8 years, 6 months ago (2012-06-02 00:35:31 UTC) #23
Change committed as 140139

Powered by Google App Engine
This is Rietveld 408576698