https://webassembly.github.io/spec/js-api/#error-objects
| 97 | visitor.visit(m_inverse_extern_values); |
| 98 | visitor.visit(m_global_instances); |
| 99 | visitor.visit(m_memory_instances); |
| 100 | visitor.visit(m_table_instances); |
| 101 | m_abstract_machine.visit_external_resources({ .visit_trap = [&visitor](Wasm::ExternallyManagedTrap const& trap) { |
| 102 | auto& completion = trap.unsafe_external_object_as<JS::Completion>(); |
| 103 | visitor.visit(completion.value()); |
| 104 | } }); |
| 105 | } |
| 106 | |
| 107 | } |
| 108 | |
| 109 | // https://webassembly.github.io/spec/js-api/#error-objects |
| 110 | void initialize(JS::Object& self, JS::Realm&) |
| 111 | { |
| 112 | // 1. Let namespaceObject be the namespace object. |
| 113 | auto& namespace_object = self; |
| 114 | |
| 115 | // 2. For each error of « "CompileError", "LinkError", "RuntimeError" », |
| 116 | // 2.1. Let constructor be a new object, implementing the NativeError Object Structure, with NativeError set to error. |
| 117 | // 2.2. ! DefineMethodProperty(namespaceObject, error, constructor, false). |
| 118 | u8 attr = JS::Attribute::Writable | JS::Attribute::Configurable; |
no outgoing calls