Skip to content

Commit

Permalink
src: remove unused function GetName() in node_perf
Browse files Browse the repository at this point in the history
PR-URL: #49244
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
  • Loading branch information
pluris authored and UlisesGascon committed Sep 10, 2023
1 parent fac56db commit dc09286
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/node_perf.cc
Expand Up @@ -236,18 +236,6 @@ static void RemoveGarbageCollectionTracking(
GarbageCollectionCleanupHook(env);
}

// Gets the name of a function
inline Local<Value> GetName(Local<Function> fn) {
Local<Value> val = fn->GetDebugName();
if (val.IsEmpty() || val->IsUndefined()) {
Local<Value> boundFunction = fn->GetBoundFunction();
if (!boundFunction.IsEmpty() && !boundFunction->IsUndefined()) {
val = GetName(boundFunction.As<Function>());
}
}
return val;
}

// Notify a custom PerformanceEntry to observers
void Notify(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Expand Down

0 comments on commit dc09286

Please sign in to comment.