From 0bfffb80c4262e1eb20d4bdddbc81d73467e9bec Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 5 Oct 2022 07:28:01 -0400 Subject: [PATCH] Fix spurious warning Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2243 --- platform/common/vapi-background.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/common/vapi-background.js b/platform/common/vapi-background.js index 996df0c5a..a4a231ffa 100644 --- a/platform/common/vapi-background.js +++ b/platform/common/vapi-background.js @@ -22,6 +22,8 @@ // For background page +/* globals browser */ + 'use strict'; /******************************************************************************/ @@ -721,7 +723,8 @@ vAPI.setIcon = (( ) => { for ( const img of imgs ) { if ( img.r.complete === false ) { return; } } - const ctx = document.createElement('canvas').getContext('2d'); + const ctx = document.createElement('canvas') + .getContext('2d', { willReadFrequently: true }); const iconData = [ null, null ]; for ( const img of imgs ) { if ( img.cached ) { continue; }