Skip to content

Commit

Permalink
feat(core): native bindings names
Browse files Browse the repository at this point in the history
Makes native builtin functions easier to recognize when debugging/profiling, they would otherwise appear as "(anonymous)" functions

Requires denoland/rusty_v8#792
  • Loading branch information
AaronO committed Oct 1, 2021
1 parent 1dfa35b commit 0e3ebc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,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());
}

Expand Down

0 comments on commit 0e3ebc4

Please sign in to comment.