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

Function gjs_get_module_registry

gjs/module.cpp:320–326  ·  view source on GitHub ↗

* gjs_get_module_registry: * @global: the JS global object * * Retrieves a global's module registry from the MODULE_REGISTRY slot. * Registries are JS Maps. See gjs_get_native_registry() for more detail. * * Returns: the module registry, a JS Map object */

Source from the content-addressed store, hash-verified

318 * Returns: the module registry, a JS Map object
319 */
320JSObject* gjs_get_module_registry(JSObject* global) {
321 JS::Value esm_registry =
322 gjs_get_global_slot(global, GjsGlobalSlot::MODULE_REGISTRY);
323
324 g_assert(esm_registry.isObject());
325 return &esm_registry.toObject();
326}
327
328/**
329 * gjs_get_source_map_registry:

Callers 3

eval_moduleMethod · 0.85
gjs_load_internal_moduleFunction · 0.85

Calls 1

gjs_get_global_slotFunction · 0.85

Tested by

no test coverage detected