Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give workers a base URL and clean up shared workers #165

Merged
merged 1 commit into from
Sep 21, 2015
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Sep 18, 2015

This fixes the following from #164:

  • It gives workers a base URL that matches the response's url. Per https://www.w3.org/Bugs/Public/show_bug.cgi?id=28835 this matches Firefox and would also be more consistent with how the platform determines base URLs in general. (The fix is slightly ugly as it puts the URL on the global object so it can be overridden later. In HTML Standard theory the global object is optional and non-JavaScript languages need not provide it, but I think we should move away from that and while file a follow up issue on the matter.)
  • It keys shared worker on constructor URL rather than "location". The latter takes redirects into account and if implemented results in racy behavior. Fortunately, neither Chrome nor Firefox implemented this and instead already use this new "constructor url" concept.
  • It references "in parallel" where used.
  • It defaults name to the empty string through IDL.

@zcorpan
Copy link
Member

zcorpan commented Sep 21, 2015

LGTM. Can you file a follow up issue for the first bullet point?

@zcorpan
Copy link
Member

zcorpan commented Sep 21, 2015

Oh I suppose #167 is that issue, right?

This fixes the following from #164:

* It gives workers a base URL that matches the response's url. Per https://www.w3.org/Bugs/Public/show_bug.cgi?id=28835 this matches Firefox and would also be more consistent with how the platform determines base URLs in general. (The fix is slightly ugly as it puts the URL on the global object so it can be overridden later. In HTML Standard theory the global object is optional and non-JavaScript languages need not provide it, but I think we should move away from that: #167.)

* It keys shared worker on constructor URL rather than "location". The latter takes redirects into account and if implemented results in racy behavior. Fortunately, neither Chrome nor Firefox implemented this and instead already use this new "constructor url" concept.

* It references "in parallel" where used.

* It defaults name to the empty string through IDL.
@annevk annevk merged commit b620471 into master Sep 21, 2015
@annevk annevk deleted the workers branch September 21, 2015 17:52
@annevk
Copy link
Member Author

annevk commented Sep 21, 2015

It is, updated the commit message to mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants