aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/library.js b/src/library.js
index c160c785..25251299 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5050,11 +5050,11 @@ LibraryManager.library = {
try {
var lib_module = eval(lib_data)(
#if ASM_JS
- asm.maxFunctionIndex,
- Module
+ Runtime.functionTable.length,
#else
- {{{ Functions.getTable('x') }}}.length
+ {{{ Functions.getTable('x') }}}.length,
#endif
+ Module
);
} catch (e) {
#if ASSERTIONS
@@ -5132,7 +5132,12 @@ LibraryManager.library = {
} else {
var result = lib.module[symbol];
if (typeof result == 'function') {
+#if ASM_JS
+ result = lib.module.SYMBOL_TABLE[symbol];
+ assert(result);
+#else
result = Runtime.addFunction(result);
+#endif
lib.cached_functions = result;
}
return result;