From 4208d091af98a606b7e7901439bd2a1360a57828 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Fri, 1 Oct 2021 15:45:22 +0200 Subject: [PATCH] feat(core): native bindings names Makes native builtin functions easier to recognize when debugging/profiling, they would otherwise appear as "(anonymous)" functions Requires https://github.com/denoland/rusty_v8/pull/792 --- core/bindings.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/bindings.rs b/core/bindings.rs index 7b3abc60243440..cf4fd07f693738 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -180,6 +180,7 @@ pub fn set_func( let key = v8::String::new(scope, name).unwrap(); let tmpl = v8::FunctionTemplate::new(scope, callback); let val = tmpl.get_function(scope).unwrap(); + val.set_name(key); obj.set(scope, key.into(), val.into()); }