Skip to content

Commit

Permalink
Workaround in fix for favicon of image documents
Browse files Browse the repository at this point in the history
(to not break regular favicons)
(#208, #224)
  • Loading branch information
Infocatcher committed Aug 22, 2016
1 parent 38dde6e commit 205b098
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ var privateTab = {
var restoreTimer = 0;
patcher.wrapFunction(
gBrowser, meth, key,
function before(tab, uri) {
function before(tab, uri, loadingPrincipal) {
if(!uri || _this.isPrivateWindow(window))
return;
var isPrivate = _this.isPrivateTab(tab); //~ todo: may work wrong with Electrolysis
Expand Down Expand Up @@ -1259,10 +1259,14 @@ var privateTab = {
}
}
catch(e) {
Components.utils.reportError(e);
// Something went wrong, will use cached icon
args[1] = "moz-anno:favicon:" + val.replace(/[&#]-moz-resolution=\d+,\d+$/, "");
_log("setTabAttributeProxy() => moz-anno:favicon:");
if(!doc && ("" + e).indexOf("unsafe CPOW usage") != -1)
_log("setTabAttributeProxy(): can't get content document, unsafe CPOW usage");
else {
Components.utils.reportError(e);
// Something went wrong, will use cached icon
args[1] = "moz-anno:favicon:" + val.replace(/[&#]-moz-resolution=\d+,\d+$/, "");
_log("setTabAttributeProxy() => moz-anno:favicon:");
}
}
}
}
Expand Down

0 comments on commit 205b098

Please sign in to comment.