mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Ensure that WASM module was actually loaded
This commit is contained in:
parent
81e4cb81e3
commit
fc03782985
@ -497,6 +497,9 @@ HNTrieContainer.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
initWASM: function(module) {
|
initWASM: function(module) {
|
||||||
|
if ( module instanceof WebAssembly.Module === false ) {
|
||||||
|
return Promise.resolve(null);
|
||||||
|
}
|
||||||
if ( this.wasmInstancePromise === null ) {
|
if ( this.wasmInstancePromise === null ) {
|
||||||
const memory = new WebAssembly.Memory({ initial: 2 });
|
const memory = new WebAssembly.Memory({ initial: 2 });
|
||||||
this.wasmInstancePromise = WebAssembly.instantiate(
|
this.wasmInstancePromise = WebAssembly.instantiate(
|
||||||
|
Loading…
Reference in New Issue
Block a user