From 5da3aaaabf93939d1f0893c1aff240a6c9634ca3 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 21 Feb 2020 15:21:25 -0500 Subject: [PATCH] Properly test for WebAssembly presence before use Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/900 --- src/js/strie.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/strie.js b/src/js/strie.js index 5243ebb83..99b8a9adc 100644 --- a/src/js/strie.js +++ b/src/js/strie.js @@ -679,6 +679,7 @@ const roundToPageSize = v => (v + PAGE_SIZE-1) & ~(PAGE_SIZE-1); } async enableWASM() { + if ( typeof WebAssembly !== 'object' ) { return false; } if ( this.wasmMemory instanceof WebAssembly.Memory ) { return true; } const module = await getWasmModule(); if ( module instanceof WebAssembly.Module === false ) {