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

ES Modules: Set referrer for top-level module script in ModuleScriptLoader #11525

Merged
merged 1 commit into from Jun 18, 2018

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jun 15, 2018

Before this CL, referrer for top-level module script is set in
BaseFetchContext::AddAdditionalRequestHeaders() using
ExecutionContext::GetOutgoingReferrer(). This works for documents, but doesn't
for workers because this execution context is corresponding to "module map
settings object", not "fetch client settings object".

To fix this, this CL sets the referrer for top-level module script using "fetch
client settings object" in ModuleScriptLoader as the spec defines.

Change-Id: I0878b13febdae4ee2dc56c998e7f2c100e9c1ba7
Bug: 842553
Reviewed-on: https://chromium-review.googlesource.com/1102236
Reviewed-by: Kouhei Ueno kouhei@chromium.org
Commit-Queue: Hiroki Nakagawa nhiroki@chromium.org
Cr-Commit-Position: refs/heads/master@{#567937}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

…oader

Before this CL, referrer for top-level module script is set in
BaseFetchContext::AddAdditionalRequestHeaders() using
ExecutionContext::GetOutgoingReferrer(). This works for documents, but doesn't
for workers because this execution context is corresponding to "module map
settings object", not "fetch client settings object".

To fix this, this CL sets the referrer for top-level module script using "fetch
client settings object" in ModuleScriptLoader as the spec defines.

Change-Id: I0878b13febdae4ee2dc56c998e7f2c100e9c1ba7
Bug: 842553
Reviewed-on: https://chromium-review.googlesource.com/1102236
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567937}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants