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

Issue 1319913002: Remove SegmentedString::m_pushedChar{1,2} optimization (Closed)

Created:
5 years, 3 months ago by kouhei (in TOK)
Modified:
5 years, 3 months ago
Reviewers:
haraken, Yoav Weiss
CC:
blink-reviews
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Remove SegmentedString::m_pushedChar{1,2} optimization Before r201294, SegmentedString::push() had an exotic behavior where two consecutive push() results are swapped. SegmentedString stored those two chars into m_pushedChar{1,2} to avoid messing up SegmentedSubString. After r201294, SegmentedString::push() is guaranteed to be used for ungetc()-like usecase, where it reverts the SegmentedString::advance() which was issued just before the call. This CL removes m_pushedChar{1,2} optimization, and replace it with SegmentedSubstring::push() which simply decrement m_data.string{8,16}Ptr. In pessimistic case, this may end up prepending wtf::String inside SegmentedSubstring, but this should be very rare. BUG=None TESTS=SegmentedStringTest Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201517

Patch Set 1 #

Total comments: 4

Patch Set 2 : rebased / use pushIfPossible #

Total comments: 1

Patch Set 3 : remove escaped() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -84 lines) Patch
M Source/platform/text/SegmentedString.h View 1 2 12 chunks +32 lines, -35 lines 0 comments Download
M Source/platform/text/SegmentedString.cpp View 1 2 10 chunks +14 lines, -49 lines 0 comments Download

Messages

Total messages: 34 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1319913002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1319913002/1
5 years, 3 months ago (2015-08-27 09:50:13 UTC) #2
kouhei (in TOK)
5 years, 3 months ago (2015-08-27 09:50:17 UTC) #4
haraken
Is there anyone who is familiar with SegmentedString? (As far as I see the git ...
5 years, 3 months ago (2015-08-27 10:48:34 UTC) #5
kouhei (in TOK)
On 2015/08/27 10:48:34, haraken wrote: > Is there anyone who is familiar with SegmentedString? (As ...
5 years, 3 months ago (2015-08-27 10:55:11 UTC) #7
kouhei (in TOK)
It looks like this is causing crash in some LayoutTests. I'll fix them tomorrow. Please ...
5 years, 3 months ago (2015-08-27 10:57:18 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/105314)
5 years, 3 months ago (2015-08-27 11:09:51 UTC) #10
Yoav Weiss
On 2015/08/27 10:55:11, kouhei wrote: > On 2015/08/27 10:48:34, haraken wrote: > > Is there ...
5 years, 3 months ago (2015-08-27 11:13:57 UTC) #11
kouhei (in TOK)
On 2015/08/27 11:13:57, Yoav Weiss wrote: > On 2015/08/27 10:55:11, kouhei wrote: > > On ...
5 years, 3 months ago (2015-08-27 11:21:03 UTC) #12
Yoav Weiss
On 2015/08/27 11:21:03, kouhei wrote: > On 2015/08/27 11:13:57, Yoav Weiss wrote: > > On ...
5 years, 3 months ago (2015-08-27 12:59:34 UTC) #13
kouhei (in TOK)
> > > Can you provide links to CLs that changed the calling behavior, making ...
5 years, 3 months ago (2015-08-27 13:03:20 UTC) #14
Yoav Weiss
https://codereview.chromium.org/1319913002/diff/1/Source/platform/text/SegmentedString.h File Source/platform/text/SegmentedString.h (right): https://codereview.chromium.org/1319913002/diff/1/Source/platform/text/SegmentedString.h#newcode54 Source/platform/text/SegmentedString.h:54: m_data.string16Ptr = m_string.characters16(); Unrelated to current CL, but when ...
5 years, 3 months ago (2015-08-27 13:08:12 UTC) #15
Yoav Weiss
https://codereview.chromium.org/1319913002/diff/1/Source/platform/text/SegmentedString.h File Source/platform/text/SegmentedString.h (right): https://codereview.chromium.org/1319913002/diff/1/Source/platform/text/SegmentedString.h#newcode88 Source/platform/text/SegmentedString.h:88: m_string.insert(&c, 1, 0); AFAICT this goes back to String::append ...
5 years, 3 months ago (2015-08-27 13:19:04 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1319913002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1319913002/20001
5 years, 3 months ago (2015-08-28 05:28:21 UTC) #18
kouhei (in TOK)
https://codereview.chromium.org/1319913002/diff/1/Source/platform/text/SegmentedString.h File Source/platform/text/SegmentedString.h (right): https://codereview.chromium.org/1319913002/diff/1/Source/platform/text/SegmentedString.h#newcode54 Source/platform/text/SegmentedString.h:54: m_data.string16Ptr = m_string.characters16(); On 2015/08/27 13:08:12, Yoav Weiss wrote: ...
5 years, 3 months ago (2015-08-28 05:38:47 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-28 07:41:08 UTC) #21
kouhei (in TOK)
yoav: Would you take a look?
5 years, 3 months ago (2015-08-31 04:10:32 UTC) #22
Yoav Weiss
LGTM % nit. Thanks for making this class saner! :) https://codereview.chromium.org/1319913002/diff/20001/Source/platform/text/SegmentedString.h File Source/platform/text/SegmentedString.h (right): https://codereview.chromium.org/1319913002/diff/20001/Source/platform/text/SegmentedString.h#newcode294 ...
5 years, 3 months ago (2015-08-31 07:57:44 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1319913002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1319913002/40001
5 years, 3 months ago (2015-09-01 00:07:34 UTC) #26
kouhei (in TOK)
haraken: Would you OWNER approve platform/text change?
5 years, 3 months ago (2015-09-01 00:16:33 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/94995)
5 years, 3 months ago (2015-09-01 00:16:35 UTC) #29
kouhei (in TOK)
Thanks for review! > https://codereview.chromium.org/1319913002/diff/20001/Source/platform/text/SegmentedString.h > File Source/platform/text/SegmentedString.h (right): > > https://codereview.chromium.org/1319913002/diff/20001/Source/platform/text/SegmentedString.h#newcode294 > Source/platform/text/SegmentedString.h:294: bool ...
5 years, 3 months ago (2015-09-01 00:17:06 UTC) #30
haraken
rubberstamp LGTM as an owner.
5 years, 3 months ago (2015-09-01 00:22:07 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1319913002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1319913002/40001
5 years, 3 months ago (2015-09-01 01:57:32 UTC) #33
commit-bot: I haz the power
5 years, 3 months ago (2015-09-01 03:45:25 UTC) #34
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201517

Powered by Google App Engine
This is Rietveld 408576698