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

Issue 333163004: Remove explicit bounds check from CSSValueList::item (Closed)

Created:
6 years, 6 months ago by Timothy Loh
Modified:
6 years, 6 months ago
CC:
blink-reviews, krit, arv+blink, blink-reviews-css, kouhei+svg_chromium.org, ed+blinkwatch_opera.com, fs, dglazkov+blink, pdr., apavlov+blink_chromium.org, Inactive, gyuyoung.kim_webkit.org, darktears, f(malita), Stephen Chennney, rune+blink, watchdog-blink-watchlist_google.com, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Remove explicit bounds check from CSSValueList::item Currently CSSValueList::item does a bounds check and will return null if the given index is out of range. This patch makes the interface slightly more sane by removing the check, which is currently otherwise skipped by calling itemWithoutBoundsCheck. Note that the vector access will perform a bounds check (with release assert) anyway. The only caller where the bounds check behaviour is useful is for the IDL binding so a separate function itemWithBoundsCheck is created for this (already tested by value-list-out-of-bounds-crash.html). Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177064

Patch Set 1 #

Total comments: 1

Patch Set 2 : address comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -68 lines) Patch
M Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/CSSValueList.h View 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/CSSValueList.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/FontFace.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/StylePropertySerializer.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/parser/CSSPropertyParser.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/CSSToStyleMap.cpp View 1 chunk +4 lines, -3 lines 0 comments Download
M Source/core/css/resolver/FilterOperationResolver.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/css/resolver/FontBuilder.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderConverter.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderCustom.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/TransformBuilder.cpp View 9 chunks +33 lines, -33 lines 0 comments Download
M Source/core/svg/SVGFontFaceElement.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Timothy Loh
A small clean-up
6 years, 6 months ago (2014-06-24 07:04:32 UTC) #1
alancutter (OOO until 2018)
lgtm with nit. https://codereview.chromium.org/333163004/diff/1/Source/core/css/StylePropertySerializer.cpp File Source/core/css/StylePropertySerializer.cpp (right): https://codereview.chromium.org/333163004/diff/1/Source/core/css/StylePropertySerializer.cpp#newcode507 Source/core/css/StylePropertySerializer.cpp:507: value = i < list->length() ? ...
6 years, 6 months ago (2014-06-26 00:36:35 UTC) #2
Timothy Loh
The CQ bit was checked by timloh@chromium.org
6 years, 6 months ago (2014-06-26 04:41:19 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timloh@chromium.org/333163004/20001
6 years, 6 months ago (2014-06-26 04:42:25 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-06-26 05:52:27 UTC) #5
(do not use) timloh
The CQ bit was unchecked by timloh@google.com
6 years, 6 months ago (2014-06-27 03:39:49 UTC) #6
Timothy Loh
The CQ bit was checked by timloh@chromium.org
6 years, 6 months ago (2014-06-27 03:40:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timloh@chromium.org/333163004/20001
6 years, 6 months ago (2014-06-27 03:41:30 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-06-27 04:42:54 UTC) #9
Message was sent while issue was closed.
Change committed as 177064

Powered by Google App Engine
This is Rietveld 408576698