gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-webex] branch master updated: don't fail hard


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] branch master updated: don't fail hard when getImageData is not allowed
Date: Wed, 19 Apr 2017 01:12:37 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-webex.

The following commit(s) were added to refs/heads/master by this push:
     new e6e0cbc  don't fail hard when getImageData is not allowed
e6e0cbc is described below

commit e6e0cbc387c2a77b48e4065c229daa65bf1aa0fa
Author: Florian Dold <address@hidden>
AuthorDate: Wed Apr 19 01:12:16 2017 +0200

    don't fail hard when getImageData is not allowed
---
 src/chromeBadge.ts | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/chromeBadge.ts b/src/chromeBadge.ts
index df12fba..369a952 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 ...
+      }
     }
   }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]