Index: test/mjsunit/wasm/wasm-module-builder.js |
diff --git a/test/mjsunit/wasm/wasm-module-builder.js b/test/mjsunit/wasm/wasm-module-builder.js |
index d7bf9a67c881c9a677711ba98a930e112712beae..5fade5bc8dbda288463539b565bf9342211e299a 100644 |
--- a/test/mjsunit/wasm/wasm-module-builder.js |
+++ b/test/mjsunit/wasm/wasm-module-builder.js |
@@ -227,12 +227,12 @@ class WasmModuleBuilder { |
this.exports.push({name: name, kind: kExternalMemory, index: 0}); |
} |
- addFunctionTableInit(base, is_global, array) { |
+ addFunctionTableInit(base, is_global, array, is_import = false) { |
this.function_table_inits.push({base: base, is_global: is_global, |
array: array}); |
if (!is_global) { |
var length = base + array.length; |
- if (length > this.function_table_length) { |
+ if (length > this.function_table_length && !is_import) { |
this.function_table_length = length; |
} |
} |