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

Issue 2213383003: Non-strict cast in showCustomInputAccessoryView: (Closed)

Created:
4 years, 4 months ago by vabr (Chromium)
Modified:
4 years, 4 months ago
Reviewers:
Justin Donnelly
CC:
chromium-reviews, rouslan+autofill_chromium.org, browser-components-watch_chromium.org, jdonnelly+autofillwatch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, sdefresne+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Non-strict cast in showCustomInputAccessoryView: FormInputAccessoryViewController's -showCustomInputAccessoryView: intends to handle the case when the view is a suggestion view and there are no suggestions by not showing the view. The code seems to have this pattern: try to cast the view into a suggestion view if (succeeded in the cast) { handle the 0-suggestion case } Also, https://codereview.chromium.org/1310813002 which introduced this code has a description indicating that the non-suggestion-view case should be handled gracefully. Yet, the code uses ObjCCastStrict instead of ObjCCast. The strict cast DCHECKs that the casted object is indeed of the target type, whereas the non-strict cast just returns nil if it is not. Given the above, it seems more appropriate to use the non-strict cast, which is done in this CL. BUG=634245 R=jdonnelly@chromium.org Committed: https://crrev.com/e26f52453211b4cba55ac5156f730691d1204b4b Cr-Commit-Position: refs/heads/master@{#410394}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M ios/chrome/browser/autofill/form_input_accessory_view_controller.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (6 generated)
vabr (Chromium)
Hi Justin, PTAL. Thank you! Vaclav
4 years, 4 months ago (2016-08-05 10:33:54 UTC) #3
vabr (Chromium)
Hi Justin, A gentle ping for this one-liner change. Cheers, Vaclav
4 years, 4 months ago (2016-08-08 07:14:09 UTC) #6
Justin Donnelly
lgtm Sorry, I missed this on Friday. Thanks for the fix!
4 years, 4 months ago (2016-08-08 17:11:19 UTC) #7
vabr (Chromium)
On 2016/08/08 17:11:19, Justin Donnelly wrote: > lgtm > > Sorry, I missed this on ...
4 years, 4 months ago (2016-08-08 17:33:59 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2213383003/1
4 years, 4 months ago (2016-08-08 17:34:06 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-08 18:06:03 UTC) #11
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 18:07:53 UTC) #13
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/e26f52453211b4cba55ac5156f730691d1204b4b
Cr-Commit-Position: refs/heads/master@{#410394}

Powered by Google App Engine
This is Rietveld 408576698