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

Issue 1372423002: [Service Workers] DCHECK from WebServiceWorkerResponse::visitHTTPHeaderFields. (Closed)

Created:
5 years, 2 months ago by Pritam Nikam
Modified:
5 years, 2 months ago
CC:
chromium-reviews, michaeln, mlamouri+watch-content_chromium.org, tzik, serviceworker-reviews, jam, jsbell+serviceworker_chromium.org, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Service Workers] DCHECK from WebServiceWorkerResponse::visitHTTPHeaderFields. Headers are ISO 8859-1 (also called ISO Latin 1), and not ASCII, any attempt of |base::UTF16ToASCII| may result into DCHECK. This patch fixes the issue by replacing |base::UTF16ToASCII| with |blink::WebString.latin1()| API. BUG=537127 TEST=serviceworker/iso-latin1-header.html Committed: https://crrev.com/348710b1cacbef1d1cd7057be134fa56cd34fdab Cr-Commit-Position: refs/heads/master@{#353700}

Patch Set 1 : #

Patch Set 2 : Added LayoutTest. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -11 lines) Patch
M content/renderer/service_worker/service_worker_type_util.cc View 1 chunk +3 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/serviceworker/iso-latin1-header.html View 1 2 chunks +4 lines, -3 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html View 1 1 chunk +2 lines, -2 lines 2 comments Download
A + third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-worker.js View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
Pritam Nikam
Hi falken, PTAL, thanks!
5 years, 2 months ago (2015-09-29 12:39:58 UTC) #3
falken
Sorry for the late review and thanks for working on this. I checked codesearch and ...
5 years, 2 months ago (2015-10-01 12:20:10 UTC) #5
horo
Looks good. But could you please add LayoutTest like LayoutTests/http/tests/serviceworker/invalid-header.html? I think "event.respondWith(new Response('', {headers: ...
5 years, 2 months ago (2015-10-02 09:34:22 UTC) #6
tyoshino (SeeGerritForStatus)
On 2015/10/01 12:20:10, falken wrote: > Sorry for the late review and thanks for working ...
5 years, 2 months ago (2015-10-02 10:56:37 UTC) #7
Pritam Nikam
On 2015/10/02 10:56:37, tyoshino wrote: > On 2015/10/01 12:20:10, falken wrote: > > Sorry for ...
5 years, 2 months ago (2015-10-12 11:36:31 UTC) #8
Pritam Nikam
Hi, Uploaded new patch with layout tests, ptal. Thanks!
5 years, 2 months ago (2015-10-12 14:05:25 UTC) #9
horo
lgtm. Thank you! :)
5 years, 2 months ago (2015-10-13 04:33:53 UTC) #10
Pritam Nikam
On 2015/10/13 04:33:53, horo wrote: > lgtm. > > Thank you! :) Thanks horo, I'll ...
5 years, 2 months ago (2015-10-13 05:14:55 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1372423002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1372423002/40001
5 years, 2 months ago (2015-10-13 05:15:37 UTC) #14
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1372423002/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html (right): https://codereview.chromium.org/1372423002/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html#newcode12 third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html:12: reject('XHR must fail.'); fail -> succeed
5 years, 2 months ago (2015-10-13 05:57:06 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:40001)
5 years, 2 months ago (2015-10-13 07:21:45 UTC) #16
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/348710b1cacbef1d1cd7057be134fa56cd34fdab Cr-Commit-Position: refs/heads/master@{#353700}
5 years, 2 months ago (2015-10-13 07:22:39 UTC) #17
Pritam Nikam
5 years, 2 months ago (2015-10-13 08:13:01 UTC) #18
Message was sent while issue was closed.
Thanks tyoshino for code review! Your comments were addressed in follow-up CL:
  https://codereview.chromium.org/1403773004/

Thanks!

https://codereview.chromium.org/1372423002/diff/40001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html
(right):

https://codereview.chromium.org/1372423002/diff/40001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/iso-latin1-header-iframe.html:12:
reject('XHR must fail.');
On 2015/10/13 05:57:06, tyoshino wrote:
> fail -> succeed

Done.

Powered by Google App Engine
This is Rietveld 408576698