mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +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
@ -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 New Issue
Block a user