* gjs_get_native_registry: * @global: The JS global object * * Retrieves a global's native registry from the NATIVE_REGISTRY slot. * Registries are JS Map objects created with JS::NewMapObject instead of * GCHashMaps (used elsewhere in GJS) because the objects need to be exposed to * internal JS code and accessed from native C++ code. * * Returns: the native module registry, a JS Map objec
| 301 | * Returns: the native module registry, a JS Map object. |
| 302 | */ |
| 303 | JSObject* gjs_get_native_registry(JSObject* global) { |
| 304 | JS::Value native_registry = |
| 305 | gjs_get_global_slot(global, GjsGlobalSlot::NATIVE_REGISTRY); |
| 306 | |
| 307 | g_assert(native_registry.isObject()); |
| 308 | return &native_registry.toObject(); |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * gjs_get_module_registry: |
no test coverage detected