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

Issue 213743018: Fix for CSS identifier related assert (Closed)

Created:
6 years, 8 months ago by Daniel Bratell
Modified:
6 years, 8 months ago
CC:
blink-reviews, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix for CSS escaped identifier assert Escaped identifiers are stored as 16-bit string so using the 8-bit string storage for them causes unexpected errors in tokenToLowerCase(). In debug there was an ASSERT that crashed the browser. In release any non-ascii chars in the string would have been partly garbled. This also removes the "const" from an argument because the function does mutate the argument so calling it const was not very honest. BUG=358750 R=eseidel Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170841

Patch Set 1 #

Total comments: 2

Patch Set 2 : Nicer testcase indentation #

Total comments: 1

Patch Set 3 : Added explanation in a comment. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -7 lines) Patch
A LayoutTests/fast/css/css-escaped-identifier.html View 1 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/css-escaped-identifier-expected.txt View 1 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/css/parser/BisonCSSParser.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/parser/BisonCSSParser-in.cpp View 1 2 1 chunk +7 lines, -6 lines 2 comments Download

Messages

Total messages: 22 (0 generated)
Daniel Bratell
Please take a look at this. I think this is a crash that can easily ...
6 years, 8 months ago (2014-04-02 10:17:12 UTC) #1
rune
Tip: use --no-find-copies with git cl upload if you haven't moved any files (to avoid ...
6 years, 8 months ago (2014-04-02 11:11:09 UTC) #2
Daniel Bratell
On 2014/04/02 11:11:09, rune - CET wrote: > Excuse my unicode ignorance, but are you ...
6 years, 8 months ago (2014-04-02 11:26:52 UTC) #3
rune
On 2014/04/02 11:26:52, Daniel Bratell wrote: > On 2014/04/02 11:11:09, rune - CET wrote: > ...
6 years, 8 months ago (2014-04-02 12:14:02 UTC) #4
eseidel
This no longer really has anything to do with the tokenizer, so can be moved ...
6 years, 8 months ago (2014-04-02 18:35:28 UTC) #5
eseidel
I'm not sure what buffer these point into. CSSParserString does not own its data. I ...
6 years, 8 months ago (2014-04-02 18:37:04 UTC) #6
Daniel Bratell
On 2014/04/02 18:37:04, eseidel wrote: > I'm not sure what buffer these point into. CSSParserString ...
6 years, 8 months ago (2014-04-02 20:04:51 UTC) #7
eseidel
Just more evidence that we need to re-think this subsystem. :)
6 years, 8 months ago (2014-04-02 20:06:03 UTC) #8
Daniel Bratell
On 2014/04/02 20:06:03, eseidel wrote: > Just more evidence that we need to re-think this ...
6 years, 8 months ago (2014-04-03 08:36:28 UTC) #9
Daniel Bratell
On 2014/04/02 20:06:03, eseidel wrote: > Just more evidence that we need to re-think this ...
6 years, 8 months ago (2014-04-03 08:36:29 UTC) #10
Daniel Bratell
On 2014/04/03 08:36:29, Daniel Bratell wrote: > > char* a = NULL; > const char* ...
6 years, 8 months ago (2014-04-03 08:41:46 UTC) #11
eseidel
yeah, i'm in no rush to replace this parser, but i expect we eventually will. ...
6 years, 8 months ago (2014-04-04 06:46:56 UTC) #12
eseidel
lgtm bleh. thanks for fixing. how long have we had this crash? do we need ...
6 years, 8 months ago (2014-04-04 06:47:37 UTC) #13
eseidel
https://codereview.chromium.org/213743018/diff/40001/Source/core/css/parser/BisonCSSParser-in.cpp File Source/core/css/parser/BisonCSSParser-in.cpp (right): https://codereview.chromium.org/213743018/diff/40001/Source/core/css/parser/BisonCSSParser-in.cpp#newcode1792 Source/core/css/parser/BisonCSSParser-in.cpp:1792: if (token.is8Bit()) { when is the token bits different ...
6 years, 8 months ago (2014-04-04 06:54:30 UTC) #14
eseidel
https://codereview.chromium.org/213743018/diff/40001/Source/core/css/parser/BisonCSSParser-in.cpp File Source/core/css/parser/BisonCSSParser-in.cpp (right): https://codereview.chromium.org/213743018/diff/40001/Source/core/css/parser/BisonCSSParser-in.cpp#newcode1792 Source/core/css/parser/BisonCSSParser-in.cpp:1792: if (token.is8Bit()) { On 2014/04/04 06:54:30, eseidel wrote: > ...
6 years, 8 months ago (2014-04-04 06:55:20 UTC) #15
eseidel
lgtm the parser allocates buffers for these strings. the only bug here is correctness, no ...
6 years, 8 months ago (2014-04-04 07:05:11 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/213743018/40001
6 years, 8 months ago (2014-04-04 07:05:23 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-04 07:27:01 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_compile_dbg
6 years, 8 months ago (2014-04-04 07:27:02 UTC) #19
Daniel Bratell
The CQ bit was checked by bratell@opera.com
6 years, 8 months ago (2014-04-04 07:42:00 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bratell@opera.com/213743018/40001
6 years, 8 months ago (2014-04-04 07:42:04 UTC) #21
commit-bot: I haz the power
6 years, 8 months ago (2014-04-04 08:10:25 UTC) #22
Message was sent while issue was closed.
Change committed as 170841

Powered by Google App Engine
This is Rietveld 408576698