From 76c942b1d67f35578f8eae9c23f0095fec564766 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 21 Dec 2018 14:14:15 +0100 Subject: Return an empty set if getting recipes for host fails. This avoids errors when _recipeManager is not (yet) available. This resolves #496. --- toolkit/components/passwordmgr/LoginManagerParent.jsm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'toolkit/components/passwordmgr') diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm index e472fb61c..2d75dac7a 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm @@ -102,8 +102,13 @@ var LoginManagerParent = { } case "RemoteLogins:findRecipes": { - let formHost = (new URL(data.formOrigin)).host; - return this._recipeManager.getRecipesForHost(formHost); + try { + let formHost = (new URL(data.formOrigin)).host; + return this._recipeManager.getRecipesForHost(formHost); + } catch(e) { + // Just return an empty set in case of error. + return new Set(); + } } case "RemoteLogins:onFormSubmit": { -- cgit v1.2.3