@@ -449,6 +449,9 @@ public class JavaScriptEnvironment: ComponentBase {
449449 registerObjectGroup ( . jsWebAssemblyException)
450450 registerObjectGroup ( . jsWebAssemblyExceptionPrototype)
451451 registerObjectGroup ( . jsWebAssemblyExceptionConstructor)
452+ registerObjectGroup ( . jsWebAssemblyError)
453+ registerObjectGroup ( . jsWebAssemblyErrorPrototype)
454+ registerObjectGroup ( . jsWebAssemblyErrorConstructor)
452455 registerObjectGroup ( . jsWebAssembly)
453456 registerObjectGroup ( . jsWasmGlobal)
454457 registerObjectGroup ( . jsWasmMemory)
@@ -2732,9 +2735,38 @@ public extension ObjectGroup {
27322735
27332736 // WebAssembly.CompileError, .LinkError, .RuntimeError don't offer anything interesting but a
27342737 // constructor.
2738+ fileprivate static let jsWebAssemblyError = ObjectGroup (
2739+ name: " WebAssemblyError " ,
2740+ instanceType: nil ,
2741+ properties: [
2742+ " message " : . jsString,
2743+ " name " : . jsString,
2744+ ] ,
2745+ methods: [ : ]
2746+ )
2747+
27352748 fileprivate static let webAssemblyErrorConstructorType =
2736- ILType . constructor ( [ . opt( . string) , . opt( . object( ) | . string) , . opt( . string) ] => . object( ) )
2737- + . object( withProperties: [ " prototype " ] )
2749+ ILType . constructor ( [ . opt( . string) , . opt( . object( ) | . string) , . opt( . string) ] => jsWebAssemblyError. instanceType)
2750+ + . object( ofGroup: " WebAssemblyErrorConstructor " , withProperties: [ " prototype " ] )
2751+
2752+ fileprivate static let jsWebAssemblyErrorPrototype = createPrototypeObjectGroup (
2753+ jsWebAssemblyError,
2754+ constructor: webAssemblyErrorConstructorType,
2755+ additionalProperties: [
2756+ " message " : . jsString,
2757+ " name " : . jsString,
2758+ ]
2759+ )
2760+
2761+ fileprivate static let jsWebAssemblyErrorConstructor = ObjectGroup (
2762+ name: " WebAssemblyErrorConstructor " ,
2763+ instanceType: webAssemblyErrorConstructorType,
2764+ properties: [
2765+ " prototype " : jsWebAssemblyErrorPrototype. instanceType,
2766+ ] ,
2767+ methods: [ : ]
2768+ )
2769+
27382770 fileprivate static let webAssemblySuspendingConstructorType = ILType . constructor ( [ . plain( . function( ) ) ] => . object( ) )
27392771
27402772 static let jsWebAssembly = ObjectGroup (
0 commit comments