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

Function gjs_internal_set_module_private

gjs/internal.cpp:246–256  ·  view source on GitHub ↗

* gjs_internal_set_module_private: * @module: The JS module object * @private: The JS module private object for @module * * JS function exposed as `setModulePrivate` in the internal global scope. * * Sets the private object of an internal #Module object. * * Returns: JS undefined */

Source from the content-addressed store, hash-verified

244 * Returns: JS undefined
245 */
246bool gjs_internal_set_module_private(JSContext* cx, unsigned argc,
247 JS::Value* vp) {
248 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
249 JS::RootedObject module(cx), private_obj(cx);
250 if (!gjs_parse_call_args(cx, "setModulePrivate", args, "oo", "module",
251 &module, "private", &private_obj))
252 return handle_wrong_args(cx);
253
254 JS::SetModulePrivate(module, JS::ObjectValue(*private_obj));
255 return true;
256}
257
258/**
259 * gjs_internal_get_registry:

Callers

nothing calls this directly

Calls 2

gjs_parse_call_argsFunction · 0.85
handle_wrong_argsFunction · 0.85

Tested by

no test coverage detected