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

extension: Set responseHeadersUnsupported to false explicitly #18176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danielhjacobs
Copy link
Contributor

@danielhjacobs danielhjacobs commented Oct 5, 2024

I think this is the cause of the issue described here: #18161 (reply in thread)

I mentioned this briefly on Discord: When you use Ruffle on a browser without support for a responseHeaders RuleCondition that later gets support, Ruffle has already set this value to true. I assumed that we could just default to false if it wasn't set and that would be fine, but then in this situation it just stays true indefinitely.

@@ -156,6 +157,7 @@ async function disableSWFTakeover() {
await utils.declarativeNetRequest.updateDynamicRules({
removeRuleIds: [1, 2, 3],
});
utils.storage.sync.set({ responseHeadersUnsupported: false });
Copy link
Contributor Author

@danielhjacobs danielhjacobs Oct 5, 2024

Choose a reason for hiding this comment

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

I don't need this redundancy to be honest, but it's probably fine. Willing to hear other opinions though.

Honestly, I think disableSWFTakeover can run unconditionally and set nothing. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/updateDynamicRules#removeruleids says any invalid IDs are ignored.

@danielhjacobs danielhjacobs added A-web Area: Web & Extensions extension Related to the Ruffle WebExtension T-fix Type: Bug fix (in something that's supposed to work already) labels Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web Area: Web & Extensions extension Related to the Ruffle WebExtension T-fix Type: Bug fix (in something that's supposed to work already)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants