* 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 */
| 318 | * Returns: the module registry, a JS Map object |
| 319 | */ |
| 320 | JSObject* 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: |
no test coverage detected