Open Bug 1493002 Opened 3 years ago Updated 2 years ago
Manager needs a way to wipe origins based on protocol scheme in support of libdweb
libdweb (https://github.com/mozilla/libdweb) is an experimental WebExtensions API thing provides a means of registering custom protocols whose loaded pages actually have the origin of the custom protocol. (Compare with navigator.registerProtocolHandler and the similar WebExtensions Firefox-only "protocol_handlers" mechanism which use the origin of the triggering page/extension instead.) We need a way to clean up after these custom protocols when they're uninstalled. I don't believe OriginScope supports this currently. "Prefix" sounds like it should, but the naming there is misleading; prefix is just an origin match without checking the OriginAttributes suffix. For safety reasons, it would likely make sense to add a new permutation to OriginScope that is explicitly about the protocol scheme rather than doing bare string prefix matching. It would also make sense to expose this on nsIQuotaManagerService. (Compare with the "pattern" clearing which is used to clear based on OriginAttributes that happens via the "clear-origin-attributes-data" observer subject. 1: https://github.com/mozilla/libdweb/blob/master/Readme.md#protocol-api 2: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler 3: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers 4: https://searchfox.org/mozilla-central/source/dom/quota/OriginScope.h
I filed https://github.com/mozilla/libdweb/issues/83 on libdweb for the need to clear storage on protocol uninstall, and it references back to this bug.
You need to log in before you can comment on or make changes to this bug.