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

Issue 1305393006: Don't NFC-normalize strings during Blob/File construction (Closed)

Created:
5 years, 3 months ago by jsbell
Modified:
5 years, 3 months ago
Reviewers:
kinuko, adamk
CC:
blink-reviews, kinuko+fileapi, nhiroki, tzik
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Don't NFC-normalize strings during Blob/File construction Back in the mists of time, BlobBuilder called UTF8Encoding().encode() when appending strings, which looks correct. But then mean old https://crbug.com/117128 came along pointing out that encode() was actually NFC normalizing strings even when not wanted, so https://crrev.com/19845004 cleverly renamed the function to normalizeAndEncode() so future callers would not fall into this trap. A few existing places such as XHR were eventually changed to just call encode() (https://crrev.com/22875053) but no-one noticed BlobBuilder was getting it wrong prior to this bug report. Change the BlobData::appendText() method to just call encode(), and add a test case for the Blob constructor. The new behavior matches FF and IE. BUG=427183 R=kinuko@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201497

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M LayoutTests/fast/files/blob-constructor.html View 2 chunks +11 lines, -0 lines 0 comments Download
M LayoutTests/fast/files/blob-constructor-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/blob/BlobData.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (4 generated)
jsbell
kinuko@ - please take a look?
5 years, 3 months ago (2015-08-28 23:45:42 UTC) #1
kinuko
On 2015/08/28 23:45:42, jsbell wrote: > kinuko@ - please take a look? lgtm, thx for ...
5 years, 3 months ago (2015-08-29 01:39:08 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305393006/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305393006/1
5 years, 3 months ago (2015-08-29 20:21:35 UTC) #4
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/94539)
5 years, 3 months ago (2015-08-29 20:28:57 UTC) #6
kinuko
Sorry, I'm not an owner of Source/platform...
5 years, 3 months ago (2015-08-31 07:16:52 UTC) #7
jsbell
adamk@ - can you OWNERS stamp? (And thanks for reviewing kinuko@!)
5 years, 3 months ago (2015-08-31 17:17:37 UTC) #9
adamk
lgtm stamp for Source/platform
5 years, 3 months ago (2015-08-31 17:20:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305393006/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305393006/1
5 years, 3 months ago (2015-08-31 18:11:05 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=201497
5 years, 3 months ago (2015-08-31 19:45:29 UTC) #13
tkent
Does this fix crbug.com/341019 too?
5 years, 3 months ago (2015-09-01 00:03:18 UTC) #14
jsbell
On 2015/09/01 00:03:18, tkent wrote: > Does this fix crbug.com/341019 too? From a quick glance ...
5 years, 3 months ago (2015-09-01 00:12:55 UTC) #15
tkent
5 years, 3 months ago (2015-09-01 00:26:03 UTC) #16
Message was sent while issue was closed.
On 2015/09/01 00:12:55, jsbell wrote:
> On 2015/09/01 00:03:18, tkent wrote:
> > Does this fix crbug.com/341019 too?
> 
> From a quick glance at the issue, I doubt it. This one is about content being
> added to the blob data stream. That bug is about the "metadata" (filename).
> 
> I think the issue is here:
> 
>
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit...
> 
> 
> ... which is a similar case where a encoding is being done with
> normalizeAndEncode() where encode() might be more appropriate.
> 
> I'll take that bug, and verify.

Great.  Thank you for the investigation and taking it.

Powered by Google App Engine
This is Rietveld 408576698