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

Issue 2099413002: Don't use consume() in CSSTokenizer when ignoring the return value. (Closed)

Created:
4 years, 5 months ago by esprehn
Modified:
4 years, 5 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't use consume() in CSSTokenizer when ignoring the return value. consume() (the no argument version) does a bunch of work handling out of bounds access, NUL replacement characters, and returning the char. Many of the callers just want to increment the offset. We could do that by replacing the call sites with consume(1) which is the "fast" version that doesn't have a return value, but it'd make the code more clear to just inline advance() in the right spots. BUG=605792 Committed: https://crrev.com/c0d8da0516d76101a420989d2fc9ce9444c21c32 Cr-Commit-Position: refs/heads/master@{#402328}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -13 lines) Patch
M third_party/WebKit/Source/core/css/parser/CSSTokenizer.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp View 7 chunks +7 lines, -12 lines 1 comment Download

Messages

Total messages: 14 (7 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2099413002/1
4 years, 5 months ago (2016-06-27 19:36:05 UTC) #2
esprehn
4 years, 5 months ago (2016-06-27 21:04:09 UTC) #5
meade_UTC10
lgtm I don't really understand the comment about consume() doing extra work here, this looks ...
4 years, 5 months ago (2016-06-27 21:35:55 UTC) #6
esprehn
https://codereview.chromium.org/2099413002/diff/1/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp File third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp (left): https://codereview.chromium.org/2099413002/diff/1/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp#oldcode117 third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp:117: void CSSTokenizer::consume(unsigned offset) This is confusing, but there was ...
4 years, 5 months ago (2016-06-27 21:46:29 UTC) #7
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/2099413002/1
4 years, 5 months ago (2016-06-27 21:49:13 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-06-27 23:23:11 UTC) #12
commit-bot: I haz the power
4 years, 5 months ago (2016-06-27 23:25:11 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/c0d8da0516d76101a420989d2fc9ce9444c21c32
Cr-Commit-Position: refs/heads/master@{#402328}

Powered by Google App Engine
This is Rietveld 408576698