From 2213edceac762beae4ca3f6e2932f422b661da39 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Fri, 10 Jan 2025 14:45:28 +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. --- 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 });