* gjs_internal_get_source_map_registry: * @global: The JS global object * * JS function exposed as `getSourceMapRegistry` in the internal global scope. * * Retrieves the source map registry for @global. * * Returns: the source map registry, a JS Map object. */
| 289 | * Returns: the source map registry, a JS Map object. |
| 290 | */ |
| 291 | bool gjs_internal_get_source_map_registry(JSContext* cx, unsigned argc, |
| 292 | JS::Value* vp) { |
| 293 | JS::CallArgs args = JS::CallArgsFromVp(argc, vp); |
| 294 | JS::RootedObject global{cx}; |
| 295 | if (!gjs_parse_call_args(cx, "getSourceMapRegistry", args, "o", "global", |
| 296 | &global)) |
| 297 | return handle_wrong_args(cx); |
| 298 | |
| 299 | JSAutoRealm ar{cx, global}; |
| 300 | |
| 301 | JSObject* registry = gjs_get_source_map_registry(global); |
| 302 | args.rval().setObject(*registry); |
| 303 | return true; |
| 304 | } |
| 305 | |
| 306 | /** |
| 307 | * gjs_uri_object: |
nothing calls this directly
no test coverage detected