From af89b537ac2ce53951c202dc58cb227da1ca00d3 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Mon, 13 Jan 2025 12:30:19 +0000 Subject: [PATCH] util: expose CallSite.scriptId The `scriptId` is essential to construct chrome devtools protocol structs like `Network.Initiator`, allowing inspectors to associate a `CallSite` with a unique script. PR-URL: https://github.com/nodejs/node/pull/56551 Reviewed-By: Ruben Bridgewater Reviewed-By: Marco Ippolito Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- doc/api/util.md | 5 +++++ src/env_properties.h | 1 + src/node_util.cc | 4 ++++ test/parallel/test-util-getcallsites.js | 7 +++++++ 4 files changed, 17 insertions(+) diff --git a/doc/api/util.md b/doc/api/util.md index d344befae410ca..ba6a4def9c110b 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -371,6 +371,9 @@ util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });