From 84dc6757327ea4dd94e1db7a1d23df1245a650dc Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Thu, 10 Jul 2025 16:55:15 -0700 Subject: [PATCH] fix: namespaceInstance ModuleNamespace IDL refactoring --- document/js-api/index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 316d22415..6eb35a2a0 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -321,7 +321,7 @@ namespace WebAssembly { Promise<Instance> instantiate( Module moduleObject, optional object importObject); - Instance namespaceInstance(ModuleNamespace moduleNamespace); + Instance namespaceInstance(object moduleNamespace); }; @@ -543,7 +543,7 @@ Note: A follow-on streaming API is documented in the namespaceInstance(|namespace|) method, when invoked, performs the following steps: - 1. Assert: |namespace| is a [=Module Namespace exotic object=]. + 1. If |namespace| is not a [=Module Namespace exotic object=] with a \[[Module]] internal slot, [=throw=] a {{TypeError}} exception. 1. If |namespace|.\[[Module]] is not a [=WebAssembly Module Record=], [=throw=] a {{TypeError}} exception. 1. Let |module| be |namespace|.\[[Module]]. 1. Return |module|.\[[Instance]].