1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-14 23:12:28 +02:00

Ensure that WASM module was actually loaded

This commit is contained in:
Raymond Hill 2019-02-01 09:09:51 -05:00
parent 81e4cb81e3
commit fc03782985
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -497,6 +497,9 @@ HNTrieContainer.prototype = {
},
initWASM: function(module) {
if ( module instanceof WebAssembly.Module === false ) {
return Promise.resolve(null);
}
if ( this.wasmInstancePromise === null ) {
const memory = new WebAssembly.Memory({ initial: 2 });
this.wasmInstancePromise = WebAssembly.instantiate(