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

Method to_string

gi/object.cpp:3346–3357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3344}
3345
3346bool ObjectBase::to_string(JSContext* cx, unsigned argc, JS::Value* vp) {
3347 GJS_CHECK_WRAPPER_PRIV(cx, argc, vp, args, obj, ObjectBase, priv);
3348 const char* kind = ObjectBase::DEBUG_TAG;
3349 if (!priv->is_prototype())
3350 kind = priv->to_instance()->to_string_kind();
3351 return gjs_wrapper_to_string_func(
3352 // False positive https://github.com/llvm/llvm-project/issues/195557
3353 // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
3354 cx, obj, kind, priv->info(), priv->gtype(),
3355 priv->is_prototype() ? nullptr : priv->to_instance()->ptr(),
3356 args.rval());
3357}
3358
3359/**
3360 * ObjectInstance::to_string_kind:

Callers

nothing calls this directly

Calls 7

is_prototypeMethod · 0.80
to_string_kindMethod · 0.80
to_instanceMethod · 0.80
infoMethod · 0.65
gtypeMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected