File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change 93
93
if ( ! iconUrl && tab . hasAttribute ( 'zen-pin-id' ) ) {
94
94
try {
95
95
setTimeout ( async ( ) => {
96
- try {
97
- await this . promisePinnedCacheInitialized ;
98
- const pin = this . _pinsCache ?. find (
99
- ( pin ) => pin . uuid === tab . getAttribute ( 'zen-pin-id' )
100
- ) ;
101
- let favicon = await PlacesUtils . favicons . getFaviconForPage (
102
- Services . io . newURI ( pin . url )
103
- ) ;
104
- if ( favicon ) {
105
- gBrowser . setIcon ( tab , favicon . dataURI ) ;
106
- }
107
- } catch ( error ) {
108
- console . warn ( 'Error getting favicon URL:' , error ) ;
96
+ const favicon = await this . getFaviconAsBase64 ( tab . linkedBrowser . currentURI ) ;
97
+ if ( favicon ) {
98
+ gBrowser . setIcon ( tab , favicon ) ;
109
99
}
110
100
} ) ;
111
101
} catch { }
651
641
return faviconData . dataURI ;
652
642
} catch ( ex ) {
653
643
console . error ( 'Failed to get favicon:' , ex ) ;
654
- // console.error("Failed to get favicon:", ex);
655
- return `page-icon:${ pageUrl } ` ; // Use this as a fallback
644
+ return null ;
656
645
}
657
646
}
658
647
You can’t perform that action at this time.
0 commit comments