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

Function gjs_internal_get_source_map_registry

gjs/internal.cpp:291–304  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

289 * Returns: the source map registry, a JS Map object.
290 */
291bool 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:

Callers

nothing calls this directly

Calls 3

gjs_parse_call_argsFunction · 0.85
handle_wrong_argsFunction · 0.85

Tested by

no test coverage detected