Skip to content

Commit 529e587

Browse files
committed
Fixed profiler
1 parent e3f73c4 commit 529e587

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • boa/src/builtins/function

boa/src/builtins/function/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ pub fn make_constructor_fn(
413413
prototype: Value,
414414
constructable: bool,
415415
) -> Value {
416+
let _timer = BoaProfiler::global().start_event(&format!("make_constructor_fn: {}", name), "init");
417+
416418
// Create the native function
417419
let mut function = Function::builtin(Vec::new(), body);
418420
function.constructable = constructable;
@@ -478,7 +480,7 @@ where
478480
N: Into<String>,
479481
{
480482
let name = name.into();
481-
let _timer = BoaProfiler::global().start_event(&name, "make_builtin_fn");
483+
let _timer = BoaProfiler::global().start_event(&format!("make_builtin_fn: {}", &name), "init");
482484

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

0 commit comments

Comments
 (0)