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

Function load_module_elements

gjs/importer.cpp:351–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351GJS_JSAPI_RETURN_CONVENTION
352static bool load_module_elements(JSContext* cx, JS::HandleObject in_object,
353 JS::MutableHandleIdVector prop_ids,
354 GFile* file) {
355 JS::RootedObject module_obj(cx, load_module_init(cx, in_object, file));
356 if (!module_obj)
357 return false;
358
359 JS::Rooted<JS::IdVector> ids(cx, cx);
360 if (!JS_Enumerate(cx, module_obj, &ids))
361 return false;
362
363 if (!prop_ids.appendAll(ids)) {
364 JS_ReportOutOfMemory(cx);
365 return false;
366 }
367
368 return true;
369}
370
371/* If error, returns false. If not found, returns true but does not touch the
372 * value at *result. If found, returns true and sets *result = true.

Callers 1

importer_new_enumerateFunction · 0.85

Calls 1

load_module_initFunction · 0.85

Tested by

no test coverage detected