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

Issue 1582813003: Remove redundant emptiness check from genericParseNumber (Closed)

Created:
4 years, 11 months ago by fs
Modified:
4 years, 11 months ago
Reviewers:
pdr.
CC:
blink-reviews, chromium-reviews, krit, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove redundant emptiness check from genericParseNumber When the 'start == ptr' condition was reached we could be sure that we had already consumed at least one character - one of '.' or '0'-'9' or whitespace (potentially also '+'/'-' as a prefix) - and that even holds true moving the definition of |start| after consuming any leading whitespace. The reason for this is the up-front check for any character in the set '0'-'9' or '.'. Remove the redundant checks - replacing them with an assert - while moving the definition of |start| so that it doesn't point before any leading whitespace. BUG=231612 Committed: https://crrev.com/ab685d36561909a7ef373183f37fc3d6fc21bb83 Cr-Commit-Position: refs/heads/master@{#369292}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Re-use/name ptrStartIntPart. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp View 1 4 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
fs
4 years, 11 months ago (2016-01-13 18:21:18 UTC) #2
pdr.
Codechange LGTM, just a question about making the assert easier to follow. https://codereview.chromium.org/1582813003/diff/1/third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp File third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp ...
4 years, 11 months ago (2016-01-13 18:58:12 UTC) #3
fs
https://codereview.chromium.org/1582813003/diff/1/third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp File third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp (right): https://codereview.chromium.org/1582813003/diff/1/third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp#newcode99 third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp:99: ASSERT_UNUSED(digitsStart, digitsStart != ptr); On 2016/01/13 at 18:58:11, pdr ...
4 years, 11 months ago (2016-01-13 19:16:27 UTC) #4
pdr.
On 2016/01/13 at 19:16:27, fs wrote: > https://codereview.chromium.org/1582813003/diff/1/third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp > File third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp (right): > > https://codereview.chromium.org/1582813003/diff/1/third_party/WebKit/Source/core/svg/SVGParserUtilities.cpp#newcode99 ...
4 years, 11 months ago (2016-01-13 19:23:25 UTC) #5
fs
On 2016/01/13 at 19:23:25, pdr wrote: > On 2016/01/13 at 19:16:27, fs wrote: > > ...
4 years, 11 months ago (2016-01-13 19:26:35 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1582813003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1582813003/20001
4 years, 11 months ago (2016-01-13 20:34:50 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL)
4 years, 11 months ago (2016-01-13 23:28:43 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1582813003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1582813003/20001
4 years, 11 months ago (2016-01-13 23:40:05 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) mac_chromium_rel_ng on ...
4 years, 11 months ago (2016-01-14 01:47:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1582813003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1582813003/20001
4 years, 11 months ago (2016-01-14 01:53:49 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-14 02:53:46 UTC) #17
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 02:54:48 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ab685d36561909a7ef373183f37fc3d6fc21bb83
Cr-Commit-Position: refs/heads/master@{#369292}

Powered by Google App Engine
This is Rietveld 408576698