Bug 236419 - Fail synchronously when constructing a SharedWorker with an URL that is not same-origin
Summary: Fail synchronously when constructing a SharedWorker with an URL that is not s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 230382
  Show dependency treegraph
 
Reported: 2022-02-09 16:46 PST by Chris Dumez
Modified: 2022-02-10 07:35 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.28 KB, patch)
2022-02-09 17:03 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>