| 3344 | } |
| 3345 | |
| 3346 | bool 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: |
nothing calls this directly
no test coverage detected