brizental pushed to branch mullvad-browser-140.2.0esr-15.0-1 at The Tor Project
/ Applications / Mullvad Browser
Commits:
64bcf3cf by Beatriz Rizental at 2025-08-21T15:40:41+02:00
fixup! BB 40926: Implemented the New Identity feature
- - - - -
1 changed file:
- browser/components/newidentity/content/newidentity.js
Changes:
=====================================
browser/components/newidentity/content/newidentity.js
=====================================
@@ -418,22 +418,21 @@ ChromeUtils.defineLazyGetter(this, "NewIdentityButton",
() => {
tbl.onLocationChange = (...args) => {
tbl.onLocationChange = onLocationChange;
tbl.onLocationChange(...args);
- let displayAddress;
- try {
- const url = new URL(homeURL);
- displayAddress = url.hostname;
- if (!displayAddress) {
- // no host, use full address and truncate if too long
- const MAX_LEN = 32;
- displayAddress = url.href;
- if (displayAddress.length > MAX_LEN) {
- displayAddress = `${displayAddress.substring(0,
MAX_LEN)}…`;
- }
- }
- } catch (e) {
+ const url = URL.parse(homeURL);
+ if (!url) {
// malformed URL, bail out
return;
}
+
+ let displayAddress = url.hostname;
+ if (!displayAddress) {
+ // no host, use full address and truncate if too long
+ const MAX_LEN = 32;
+ displayAddress = url.href;
+ if (displayAddress.length > MAX_LEN) {
+ displayAddress = `${displayAddress.substring(0, MAX_LEN)}…`;
+ }
+ }
const callback = () => {
Services.prefs.setStringPref(trustedHomePref, homeURL);
win.BrowserHome();
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/64bcf3cf07cbfae51d7c47d7db3e0025cfd7960d
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/64bcf3cf07cbfae51d7c47d7db3e0025cfd7960d
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]