diff options
| author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-10-05 22:55:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-05 22:55:51 +0200 |
| commit | 22328f87585611ae70e555ad7941cc5093b92544 (patch) | |
| tree | 06d4caa607c51ee8263c6cab57604d84b2aa034f /core/bindings.rs | |
| parent | 678a881f63ee8e3b86d4dc539234a78c94cc9c1e (diff) | |
feat(core): native binding names (#12290)
Makes native builtin functions easier to recognize when debugging/profiling, they would otherwise appear as "(anonymous)" functions
Diffstat (limited to 'core/bindings.rs')
| -rw-r--r-- | core/bindings.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/bindings.rs b/core/bindings.rs index 7b3abc602..cf4fd07f6 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()); } |
