Bug 236319

Summary: Worker scripts should always be decoded as UTF-8
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, darin, ggaren, sam, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 230382    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2022-02-08 12:14:36 PST
Worker scripts should always be decoded as UTF-8:
- https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-script (Step 7)
Comment 1 Chris Dumez 2022-02-08 12:17:21 PST
Created attachment 451290 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2022-02-08 13:01:05 PST
<rdar://problem/88647606>
Comment 3 Alex Christensen 2022-02-09 10:24:23 PST
Comment on attachment 451290 [details]
Patch

This change now matches Firefox and the spec but not Chrome.  Do we care?
Comment 4 Chris Dumez 2022-02-09 10:25:21 PST
(In reply to Alex Christensen from comment #3)
> Comment on attachment 451290 [details]
> Patch
> 
> This change now matches Firefox and the spec but not Chrome.  Do we care?

Given we have both the spec and Firefox on our side, I think we should at least try it.
Comment 5 Brent Fulgham 2022-02-09 10:26:22 PST
(In reply to Chris Dumez from comment #4)
> (In reply to Alex Christensen from comment #3)
> > Comment on attachment 451290 [details]
> > Patch
> > 
> > This change now matches Firefox and the spec but not Chrome.  Do we care?
> 
> Given we have both the spec and Firefox on our side, I think we should at
> least try it.

What does WPT say? Is there coverage for this?
Comment 6 Chris Dumez 2022-02-09 10:27:12 PST
(In reply to Brent Fulgham from comment #5)
> (In reply to Chris Dumez from comment #4)
> > (In reply to Alex Christensen from comment #3)
> > > Comment on attachment 451290 [details]
> > > Patch
> > > 
> > > This change now matches Firefox and the spec but not Chrome.  Do we care?
> > 
> > Given we have both the spec and Firefox on our side, I think we should at
> > least try it.
> 
> What does WPT say? Is there coverage for this?

Look at the patch? :)
Comment 7 Brent Fulgham 2022-02-09 10:29:31 PST
(In reply to Chris Dumez from comment #6)
> (In reply to Brent Fulgham from comment #5)
> > (In reply to Chris Dumez from comment #4)
> > > (In reply to Alex Christensen from comment #3)
> > > > Comment on attachment 451290 [details]
> > > > Patch
> > > > 
> > > > This change now matches Firefox and the spec but not Chrome.  Do we care?
> > > 
> > > Given we have both the spec and Firefox on our side, I think we should at
> > > least try it.
> > 
> > What does WPT say? Is there coverage for this?
> 
> Look at the patch? :)

:-P

Good point! I say ship it. WPT is truth.
Comment 8 EWS 2022-02-09 10:52:38 PST
Committed r289489 (247027@main): <https://commits.webkit.org/247027@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451290 [details].