diff options
Diffstat (limited to 'chromium/v8/third_party/wasm-api/example/table.c')
-rw-r--r-- | chromium/v8/third_party/wasm-api/example/table.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chromium/v8/third_party/wasm-api/example/table.c b/chromium/v8/third_party/wasm-api/example/table.c index 8fec71f23fa..0ff6617f729 100644 --- a/chromium/v8/third_party/wasm-api/example/table.c +++ b/chromium/v8/third_party/wasm-api/example/table.c @@ -110,7 +110,8 @@ int main(int argc, const char* argv[]) { // Instantiate. printf("Instantiating module...\n"); - own wasm_instance_t* instance = wasm_instance_new(store, module, NULL); + own wasm_instance_t* instance = + wasm_instance_new(store, module, NULL, NULL); if (!instance) { printf("> Error instantiating module!\n"); return 1; @@ -135,6 +136,11 @@ int main(int argc, const char* argv[]) { wasm_functype_delete(neg_type); + // Try cloning. + own wasm_table_t* copy = wasm_table_copy(table); + assert(wasm_table_same(table, copy)); + wasm_table_delete(copy); + // Check initial table. printf("Checking table...\n"); check(wasm_table_size(table) == 2); |