Bug 1773800 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

No description provided.
This was first brought up in this [patch](https://phabricator.services.mozilla.com/D148431). We observe a crash when selecting the Try Colorways button and loading a theme without an associated icon that we'd expect to show in the modal. (Ex. a mock theme for mochitests).
This was first brought up in this [patch](https://phabricator.services.mozilla.com/D148431). We observe a crash when selecting the Try Colorways button and loading a theme without an associated icon that we'd expect to show in the modal. (Ex. a mock theme for mochitests).

>> Hit MOZ_CRASH(Missing chrome or resource URLs: chrome://browser/content/null) at /builds/worker/checkouts/gecko/netwerk/base/nsNetUtil.cpp:3882

>That is triggered if a monochromatic theme doesn't have an icon, which was the case for the test theme installed from the test case, the line that triggers the crash is this part of ColorwaySelector.prototype.render (where we are unconditionally setting the style property --colorway-icon to url(${theme.iconURL) even if iconURL is null, and that is translated into "chrome://browser/content/null" and trigger the crash).

>The crash was triggered in both optimized and debug build while running the test, but it is restricted to while running in automation and so it shouldn't affect actual users, but I though to still point it out to you because we could also decide to avoid that by tweaking ColorwaySelector.prototype.render to either not set the --colorway-icon property if theme.iconURL is not set, or to skip the theme all together (and maybe logging an error in the browser console to point out that a certain theme id was skipped).

Back to Bug 1773800 Comment 0