mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 17:41:03 +01:00
Properly test for WebAssembly presence before use
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/900
This commit is contained in:
parent
d2b65d0cef
commit
5da3aaaabf
1 changed files with 1 additions and 0 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue