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

Issue 2786153004: Changed CSSParserContext argument from * to & for null safety. (Closed)

Created:
3 years, 8 months ago by Bugs Nash
Modified:
3 years, 8 months ago
Reviewers:
meade_UTC10, shend
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, jfernandez, Manuel Rego, rwlbuis, svillar
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Changed CSSParserContext argument from * to & for null safety. Changed the CSSParserContext argument to the parseSingleValue method in the property APIs from a pointer to a reference to ensure that nullptr cannot be passed. Note that this patch changes the syntax inside parseSingleValue implementations to get the address of CSSParserContext references to pass to utility methods that still expect a pointer. Future patches should change these utility methods to also take references instead of pointers, at which point the syntax inside parseSingleValue implementations can be changed back to pass the object. This patch: - changed the CSSParserContext parameter to parseSingleValue in CSSPropertyAPIMethods.json5 so that the generated API header files (including the base class header file) would update - changed the parameter in each of the .cpp files for the property APIs in core/css/properties - updated the single call site in CSSPropertyParser.cpp - updated the implementations of parseSingleValue in the property APIs to use reference syntax Diff of generated files: https://gist.github.com/BugsNash/1850f85afc7313dd3dac1a890299ad07/revisions BUG=668012 Review-Url: https://codereview.chromium.org/2786153004 Cr-Commit-Position: refs/heads/master@{#462380} Committed: https://chromium.googlesource.com/chromium/src/+/912e5f787ee415f874928b9684ea50dc75f85d40

Patch Set 1 #

Total comments: 1

Patch Set 2 : Addressed review #

Patch Set 3 : Updated syntax in parseSingleValue API implementations #

Patch Set 4 : Updated syntax where ref is passed as pointer #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -143 lines) Patch
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp View 1 chunk +1 line, -1 line 1 comment Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignOrJustifyContent.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignOrJustifySelf.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBaselineShift.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBorderRadius.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPICaretColor.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIClip.cpp View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIClipPath.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColor.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColumnCount.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColumnGap.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColumnRuleWidth.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColumnSpan.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIColumnWidth.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIContain.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIContent.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPICursor.cpp View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFlexBasis.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontFamily.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontSize.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontSizeAdjust.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontVariantCaps.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontVariantLigatures.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontVariantNumeric.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFontVariationSettings.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIFragmentation.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIGridAutoFlow.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIImage.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIImageOrientation.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIJustifyItems.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPILetterAndWordSpacing.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPILineHeight.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPILineHeightStep.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIMargin.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIMethods.json5 View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOffsetAnchor.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOffsetPosition.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOpacity.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOrder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOutlineColor.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOutlineOffset.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIOutlineWidth.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPadding.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPage.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPaintOrder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIPaintStroke.cpp View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIQuotes.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIRadius.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIRotate.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScale.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIScrollSnapCoordinate.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeImageThreshold.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeMargin.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPISize.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIStrokeDasharray.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIStrokeMiterlimit.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITabSize.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationColor.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationSkip.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextIndent.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextSizeAdjust.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextUnderlinePosition.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITouchAction.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITransformOrigin.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPITranslate.cpp View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIVerticalAlign.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitBorderSpacing.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitBoxFlexGroup.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitFontSizeDelta.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitHighlight.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitLineClamp.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitMargin.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitMaxLogicalWidthOrHeight.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitPadding.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextEmphasisStyle.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTextStrokeWidth.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitTransformOriginZ.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWillChange.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIZIndex.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/properties/CSSPropertyAPIZoom.cpp View 1 2 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
shend
Yesss! Love this patch. In addition to safety, it's also self documenting. Previously, someone looking ...
3 years, 8 months ago (2017-03-31 04:31:17 UTC) #3
Bugs Nash
On 2017/03/31 at 04:31:17, shend wrote: > Yesss! Love this patch. In addition to safety, ...
3 years, 8 months ago (2017-03-31 04:36:02 UTC) #4
Bugs Nash
Darren you might want to have another look at this as some stuff has changed. ...
3 years, 8 months ago (2017-04-04 01:13:37 UTC) #7
shend
still lgtm
3 years, 8 months ago (2017-04-04 01:27:53 UTC) #8
Bugs Nash
On 2017/04/04 at 01:27:53, shend wrote: > still lgtm +meade@ for owners
3 years, 8 months ago (2017-04-04 01:30:15 UTC) #10
Bugs Nash
On 2017/04/04 at 01:27:53, shend wrote: > still lgtm +meade@ for owners
3 years, 8 months ago (2017-04-04 01:30:15 UTC) #11
meade_UTC10
lgtm https://codereview.chromium.org/2786153004/diff/60001/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp File third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp (right): https://codereview.chromium.org/2786153004/diff/60001/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp#newcode15 third_party/WebKit/Source/core/css/properties/CSSPropertyAPIAlignItems.cpp:15: const CSSParserContext& context) { nit: if context isn't ...
3 years, 8 months ago (2017-04-06 03:06:27 UTC) #12
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/2786153004/60001
3 years, 8 months ago (2017-04-06 05:10:36 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/912e5f787ee415f874928b9684ea50dc75f85d40
3 years, 8 months ago (2017-04-06 07:05:41 UTC) #17
findit-for-me
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2801893003/ by findit-for-me@appspot.gserviceaccount.com. ...
3 years, 8 months ago (2017-04-06 07:21:59 UTC) #18
Michael Achenbach
On 2017/04/06 07:21:59, findit-for-me wrote: > A revert of this CL (patchset #4 id:60001) has ...
3 years, 8 months ago (2017-04-06 07:30:35 UTC) #19
awdf
3 years, 8 months ago (2017-04-06 08:02:34 UTC) #20
Message was sent while issue was closed.
On 2017/04/06 07:30:35, Michael Achenbach wrote:
> On 2017/04/06 07:21:59, findit-for-me wrote:
> > A revert of this CL (patchset #4 id:60001) has been created in
> > https://codereview.chromium.org/2801893003/ by
> > mailto:findit-for-me@appspot.gserviceaccount.com.
> > 
> > The reason for reverting is: 
> > Findit identified CL at revision 462380 as the culprit for
> > failures in the build cycles as shown on:
> >
>
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3Itb....
> 
> Guess this CL should have depended on
https://codereview.chromium.org/2783543002
> See:
>
https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/d...

I created https://bugs.chromium.org/p/chromium/issues/detail?id=708924 for the
compile failures.
I reverted https://codereview.chromium.org/2783543002 just after this was
reverted (I didn't see this one in the blamelist)

I guess they just need to be relanded in the right order once things are back to
green.

Powered by Google App Engine
This is Rietveld 408576698