mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1754409 - Add catch for invalid manual update url. r=bytesized,application-update-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D138473
This commit is contained in:
parent
4b52196621
commit
ee26d5ca8e
@ -44,16 +44,20 @@ function appUpdater(options = {}) {
|
||||
"chrome://browser/locale/browser.properties"
|
||||
);
|
||||
|
||||
let manualURL = new URL(
|
||||
Services.urlFormatter.formatURLPref("app.update.url.manual")
|
||||
);
|
||||
try {
|
||||
let manualURL = new URL(
|
||||
Services.urlFormatter.formatURLPref("app.update.url.manual")
|
||||
);
|
||||
|
||||
let manualLink = document.getElementById("manualLink");
|
||||
// Strip hash and search parameters for display text.
|
||||
manualLink.textContent = manualURL.origin + manualURL.pathname;
|
||||
manualLink.href = manualURL.href;
|
||||
let manualLink = document.getElementById("manualLink");
|
||||
// Strip hash and search parameters for display text.
|
||||
manualLink.textContent = manualURL.origin + manualURL.pathname;
|
||||
manualLink.href = manualURL.href;
|
||||
|
||||
document.getElementById("failedLink").href = manualURL.href;
|
||||
document.getElementById("failedLink").href = manualURL.href;
|
||||
} catch (e) {
|
||||
console.error("Invalid manual update url.", e);
|
||||
}
|
||||
|
||||
this._appUpdater.check();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user