MCPcopy Create free account
hub / github.com/GNOME/gjs / new_enumerate_impl

Method new_enumerate_impl

gi/boxed.cpp:104–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102// See GIWrapperBase::new_enumerate().
103template <class Base, class Prototype, class Instance>
104bool 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():

Callers

nothing calls this directly

Calls 5

infoFunction · 0.85
gjs_intern_string_to_idFunction · 0.85
methodsMethod · 0.45
is_methodMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected