|
|
@ -519,12 +519,11 @@ const HNTrieContainer = class {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async initWASM() {
|
|
|
|
async initWASM() {
|
|
|
|
const module = await HNTrieContainer.enableWASM();
|
|
|
|
|
|
|
|
if ( module instanceof WebAssembly.Module === false ) { return false; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( this.wasmInstancePromise !== null ) {
|
|
|
|
if ( this.wasmInstancePromise !== null ) {
|
|
|
|
return true;
|
|
|
|
return this.wasmInstancePromise;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const module = await HNTrieContainer.enableWASM();
|
|
|
|
|
|
|
|
if ( module instanceof WebAssembly.Module === false ) { return false; }
|
|
|
|
const memory = new WebAssembly.Memory({ initial: 2 });
|
|
|
|
const memory = new WebAssembly.Memory({ initial: 2 });
|
|
|
|
this.wasmInstancePromise = WebAssembly.instantiate(
|
|
|
|
this.wasmInstancePromise = WebAssembly.instantiate(
|
|
|
|
module,
|
|
|
|
module,
|
|
|
|