diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chromeBadge.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/chromeBadge.ts b/src/chromeBadge.ts index df12fba83..369a95227 100644 --- a/src/chromeBadge.ts +++ b/src/chromeBadge.ts @@ -150,11 +150,16 @@ export class ChromeBadge implements Badge { // Allow running outside the extension for testing if (window["chrome"] && window.chrome["browserAction"]) { - let imageData = this.ctx.getImageData(0, - 0, - this.canvas.width, - this.canvas.height); - chrome.browserAction.setIcon({imageData}); + try { + let imageData = this.ctx.getImageData(0, + 0, + this.canvas.width, + this.canvas.height); + chrome.browserAction.setIcon({imageData}); + } catch (e) { + // Might fail if browser has over-eager canvas fingerprinting countermeasures. + // There's nothing we can do then ... + } } } |