From dd8f94b085a08dd8427a14d5454534cd61e32aa2 Mon Sep 17 00:00:00 2001 From: David Dick Date: Sun, 13 Oct 2024 20:42:30 +1100 Subject: [PATCH] Fixes for the removal of setAndFetchFaviconForPage in https://bugzilla.mozilla.org/show_bug.cgi?id=1894633 --- lib/Firefox/Marionette.pm | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/Firefox/Marionette.pm b/lib/Firefox/Marionette.pm index e3d7547..6d0a958 100644 --- a/lib/Firefox/Marionette.pm +++ b/lib/Firefox/Marionette.pm @@ -2049,14 +2049,17 @@ let bookmarkStatus = (async function(bookmarkArguments) { ); } } else { - let iconResult = placesUtils.PlacesUtils.favicons.setAndFetchFaviconForPage( - url, - rIconUrl, - true, - placesUtils.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, - null, - Services.scriptSecurityManager.getSystemPrincipal() - ); + if (placesUtils.PlacesUtils.favicons.setFaviconForPage) { + } else if (placesUtils.PlacesUtils.favicons.setAndFetchFaviconForPage) { + let iconResult = placesUtils.PlacesUtils.favicons.setAndFetchFaviconForPage( + url, + rIconUrl, + true, + placesUtils.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, + null, + Services.scriptSecurityManager.getSystemPrincipal() + ); + } } } return bookmark;