| 102 | // See GIWrapperBase::new_enumerate(). |
| 103 | template <class Base, class Prototype, class Instance> |
| 104 | bool BoxedPrototype<Base, Prototype, Instance>::new_enumerate_impl( |
| 105 | JSContext* cx, JS::HandleObject, JS::MutableHandleIdVector properties, |
| 106 | bool only_enumerable [[maybe_unused]]) { |
| 107 | for (const GI::AutoFunctionInfo& meth_info : info().methods()) { |
| 108 | if (meth_info.is_method()) { |
| 109 | jsid id = gjs_intern_string_to_id(cx, meth_info.name()); |
| 110 | if (id.isVoid()) |
| 111 | return false; |
| 112 | if (!properties.append(id)) { |
| 113 | JS_ReportOutOfMemory(cx); |
| 114 | return false; |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | /** |
| 123 | * BoxedBase::get_copy_source(): |
nothing calls this directly
no test coverage detected