Skip to content

Commit 46a922e

Browse files
authored
jspi: Handle change to the type reflection API. (#20401)
1 parent dc14d80 commit 46a922e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/library_async.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ addToLibrary({
458458
#if ASYNCIFY_DEBUG
459459
dbg('asyncify: returnPromiseOnSuspend for', original);
460460
#endif
461-
var type = WebAssembly.Function.type(original);
461+
// TODO: remove `WebAssembly.Function.type` call when the new API is ready on all the testers.
462+
var type = original.type ? original.type() : WebAssembly.Function.type(original);
462463
var parameters = type.parameters;
463464
var results = type.results;
464465
#if ASSERTIONS

0 commit comments

Comments
 (0)