consider helper function to identify moz-extension scheme urls
Categories
(WebExtensions :: General, enhancement, P5)
Tracking
(firefox143 fixed)
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: mixedpuppy, Assigned: chrstina.lin, NeedInfo)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
To replace url.startsWith("moz-extension://"), perhaps ExtensionUtils.isExtensionUrl(url)
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
This was a follow-up from https://phabricator.services.mozilla.com/D151766#inline-838451 from bug 1711168.
Updated•3 years ago
|
What`s with favIconUrl.startsWith("blob:") and other protocols?
Comment 3•1 year ago
|
||
(In reply to kernp25 from comment #2)
What`s with favIconUrl.startsWith("blob:") and other protocols?
blob:-URLs may be generated internally for built-in search engines. In the source code you linked, blob:-URLs are converted to data:-URLs because extensions would otherwise encounter a URL that they cannot load. The context for that is in a regression that you reported before (bug 1918386) that we fixed.
I mean, should the helper function also work for blob: and other protocols?
Or just moz-extension:?
Maybe isUrlScheme(url)?
Comment 6•1 year ago
|
||
(In reply to kernp25 from comment #4)
I mean, should the helper function also work for
blob:and other protocols?Or just
moz-extension:?
Just moz-extension:.
Note that the implementation that calls .startWith("moz-extension://") assumes that the URL is already normalized. In situations where a nsIURI or (standard) URL is available, .schemeIs("moz-extension") and .protocol === "moz-extension:" can already be used instead, with clarity.
A search query showing some current uses of "moz-extension: in JS is at https://searchfox.org/mozilla-central/search?q=%22moz-extension%3A&path=.*js&case=false®exp=false
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Comment 10•9 months ago
|
||
Backed out for causing DT failures @browser_dbg-javascript-tracer-worker.js
Comment 11•9 months ago
|
||
Comment 12•9 months ago
|
||
Comment 13•9 months ago
|
||
Reverted this because it was causing mochitests-plain failures in test_ext_idle.html.
- Revert link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_idle.html | Idle status is active - Expected: active, Actual: idle
Updated•8 months ago
|
Comment 14•8 months ago
|
||
The above backout was unrelated to the patch here; I fixed the intermittent failures of test_ext_idle.html in bug 1947300.
The patch needs to be re-uploaded (to work around https://bugzilla.mozilla.org/show_bug.cgi?id=1963406#c6 ), but other than that it should be ready to land.
Comment 15•8 months ago
|
||
Comment 16•8 months ago
|
||
| bugherder | ||
Description
•