Bug 236419

Summary: Fail synchronously when constructing a SharedWorker with an URL that is not same-origin
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, darin, ggaren, 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-09 16:46:23 PST
Fail synchronously when constructing a SharedWorker with an unsupported protocol.
Comment 1 Chris Dumez 2022-02-09 17:03:58 PST
Created attachment 451467 [details]
Patch
Comment 2 Darin Adler 2022-02-09 17:36:20 PST
Comment on attachment 451467 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451467&action=review

> LayoutTests/imported/w3c/ChangeLog:16
> +        * web-platform-tests/workers/shared-worker-in-data-url-context.window-expected.txt:
> +        Even though this looks like a regression, this actually aligns our behavior with both
> +        Blink & Gecko (who also fail this check). Note that the load fails no matter what.
> +        However, the test expects it to fail asynchronously instead of synchronously in this
> +        case.

When will we fix WPT?
Comment 3 Chris Dumez 2022-02-09 19:36:17 PST
(In reply to Darin Adler from comment #2)
> Comment on attachment 451467 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=451467&action=review
> 
> > LayoutTests/imported/w3c/ChangeLog:16
> > +        * web-platform-tests/workers/shared-worker-in-data-url-context.window-expected.txt:
> > +        Even though this looks like a regression, this actually aligns our behavior with both
> > +        Blink & Gecko (who also fail this check). Note that the load fails no matter what.
> > +        However, the test expects it to fail asynchronously instead of synchronously in this
> > +        case.
> 
> When will we fix WPT?

I will follow-up. I think I may need to start a discussion on the spec. Technically, I think the test matches the spec and was written by a Chrome engineer to point out issues with their implementation. However, the test landed over a year ago and Chrome still hasn't updated their implementation to pass the test they added. Since the spec isn't in agreement with browsers it seems, I guess the best way forward is to modify the spec to match Blink & Gecko's implementation.
Comment 4 EWS 2022-02-10 07:34:53 PST
Committed r289532 (247063@main): <https://commits.webkit.org/247063@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451467 [details].
Comment 5 Radar WebKit Bug Importer 2022-02-10 07:35:22 PST
<rdar://problem/88753909>