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

[CRX] Enable WebAssembly in Chrome extension #18748

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Sep 15, 2024

After the removal of 'unsafe-eval' CSP from the Chrome extension in #18651 (as part of #15161), WebAssembly fails to load, resulting in issues such as seen in #18457.

Manifest Version 3 does not allow 'unsafe-eval', does accept the more specific 'wasm-unsafe-eval' as of Chrome 103. Note that manifest.json already sets minimum_chrome_version to 103.

This patch also adds object-src 'self' because it was required until Chrome 110. As of Chrome 111, the default is object-src 'self' and object-src is no longer required. We could drop object-src in the future, but for now we need to include it to support Chrome 103 - 110.

Tested by opening the PDF from #18457. Before this fix, the page was blank. With this patch, the image is rendered.

After the removal of 'unsafe-eval' CSP in mozilla#18651, WebAssembly fails to
load, resulting in issues such as seen in mozilla#18457.

Manifest Version 3 does not allow 'unsafe-eval', does accept the more
specific 'wasm-unsafe-eval' as of Chrome 103. Note that manifest.json
already sets minimum_chrome_version to 103.

This patch also adds `object-src 'self'` because it was required until
Chrome 110. As of Chrome 111, the default is `object-src 'self'` and
`object-src` is no longer required. We could drop `object-src` in the
future, but for now we need to include it to support Chrome 103 - 110.
@timvandermeij timvandermeij merged commit bf5c987 into mozilla:master Sep 15, 2024
6 checks passed
@timvandermeij
Copy link
Contributor

Thanks!

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.

2 participants