diff --git a/src/library_addfunction.js b/src/library_addfunction.js index d6a08821bbc3a..6b24c9d37eca6 100644 --- a/src/library_addfunction.js +++ b/src/library_addfunction.js @@ -235,9 +235,11 @@ addToLibrary({ return ret; }, - $removeFunction__deps: ['$functionsInTableMap', '$freeTableIndexes', '$getWasmTableEntry'], + $removeFunction__deps: ['$functionsInTableMap', '$freeTableIndexes', + '$getWasmTableEntry', '$setWasmTableEntry'], $removeFunction: (index) => { functionsInTableMap.delete(getWasmTableEntry(index)); + setWasmTableEntry(index, null); freeTableIndexes.push(index); }, });