Skip to content

Commit

Permalink
Fixed profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Jun 15, 2020
1 parent e3f73c4 commit 529e587
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boa/src/builtins/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ pub fn make_constructor_fn(
prototype: Value,
constructable: bool,
) -> Value {
let _timer = BoaProfiler::global().start_event(&format!("make_constructor_fn: {}", name), "init");

// Create the native function
let mut function = Function::builtin(Vec::new(), body);
function.constructable = constructable;
Expand Down Expand Up @@ -478,7 +480,7 @@ where
N: Into<String>,
{
let name = name.into();
let _timer = BoaProfiler::global().start_event(&name, "make_builtin_fn");
let _timer = BoaProfiler::global().start_event(&format!("make_builtin_fn: {}", &name), "init");

let mut function = Object::function(Function::builtin(Vec::new(), function));
function.insert_field("length", Value::from(length));
Expand Down

0 comments on commit 529e587

Please sign in to comment.