Skip to content

Firefox add-ons: filters on tabs.onUpdated only for Firefox add-ons - #239

Merged
zakius merged 1 commit into
mainfrom
fix/oganesson-dashboard-broken
Nov 24, 2026
Merged

zakius merged 1 commit into
mainfrom
fix/oganesson-dashboard-broken

Conversation

@zakius

@zakius zakius commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Violentmonkey 2.50 from the Chrome Web Store stopped working in oganesson. Its service worker died on its first line with Incorrect argument types for tabs.onUpdated., so the dashboard and popup did nothing.

VM checks for filter support with tabs.onUpdated.addListener(f, {properties: ["status"]}). In Chrome that call throws, and VM then drops the filter argument from every later call. Since #30 the call no longer threw here, so VM kept the argument and later passed isFirefox && filter, which is false in Chromium. That false was refused.

Firefox's filters on tabs.onUpdated and proxy.onRequest now apply only to Firefox add-ons (IsFirefoxAddOn, the gecko key), as #228 did for contextMenus.onShown. Other extensions keep Chromium's events. The bindings layer can't see the extension, so the bindings system passes it a check of the context (IsFirefoxAddOnContext).

Tested in oganesson on a dev build: unmodified VM 2.50.0 works; the new FirefoxUpdateFilterBindingsTest fails on the 1.20261122175301 release and passes on the fix; the filter, menus-bindings and proxy tests pass; Firefox's 15 ported filter and proxy tests show no single-test drops. check-patches passes with zero fuzz, and the changed sections apply with zero fuzz on tennessine's Chromium 158.0.8127.42.

🤖 Generated with Claude Code

Violentmonkey 2.50 from the Chrome Web Store tries
tabs.onUpdated.addListener(f, {properties: ["status"]}). In Chrome that
throws, and Violentmonkey then drops the filter argument of every later
call. Since the filters of #30 it didn't throw here, so Violentmonkey
kept the argument, and its next calls pass `isFirefox && filter`, which
is `false` in Chromium. addListener() refused `false` with "Incorrect
argument types for tabs.onUpdated.", so the service worker stopped in its
first line, and neither the dashboard nor the popup worked.

Firefox's filters on tabs.onUpdated and proxy.onRequest are now a Firefox
add-on's alone, as contextMenus' Firefox events are (#228): an extension
without the gecko key keeps Chromium's events, which throw "This event
does not support filters". The bindings don't see the extension, so the
bindings system gives FirefoxUpdateFilters a check of the context
(IsFirefoxAddOnContext).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant