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

Issue 614653002: ash::ShelfView: CHECK against potentially bad static_casts. (Closed)

Created:
6 years, 2 months ago by Matt Giuca
Modified:
6 years, 2 months ago
CC:
chromium-reviews, kalyank, sadrul, ben+ash_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

ash::ShelfView: CHECK against potentially bad static_casts. There are a number of static downcasts in ShelfView that are *probably* correct, but there is no clear proof that they are casting to the correct type. This patch adds explicit CHECKs before every static_cast to ensure that we are not casting from an incompatible dynamic type. drag_view_ now has type ShelfButton*, so it is downcast on assignment, rather than on many of its uses. BUG=418460 Committed: https://crrev.com/1373851514d52a205024caec9f26cc61a94f0fc2 Cr-Commit-Position: refs/heads/master@{#297335}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -7 lines) Patch
M ash/shelf/shelf_button.h View 2 chunks +3 lines, -0 lines 0 comments Download
M ash/shelf/shelf_button.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M ash/shelf/shelf_view.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/shelf/shelf_view.cc View 6 chunks +9 lines, -6 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Matt Giuca
Hi, can you both look at this? (sky wrote the original code with the ViewModel; ...
6 years, 2 months ago (2014-09-29 07:12:38 UTC) #2
sky
LGTM
6 years, 2 months ago (2014-09-29 17:51:26 UTC) #3
Mr4D (OOO till 08-26)
lgtm
6 years, 2 months ago (2014-09-29 18:05:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/614653002/1
6 years, 2 months ago (2014-09-30 00:38:14 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1) as 78335c0beee249831a75428be4586fa1c65caa4a
6 years, 2 months ago (2014-09-30 01:44:48 UTC) #7
commit-bot: I haz the power
6 years, 2 months ago (2014-09-30 01:45:51 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/1373851514d52a205024caec9f26cc61a94f0fc2
Cr-Commit-Position: refs/heads/master@{#297335}

Powered by Google App Engine
This is Rietveld 408576698