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
Jungku Lee authored Aug 21, 2023
1 parent eeddbfa commit a16b610
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/node_perf.cc
Original file line number Diff line number Diff line change
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 a16b610

Please sign in to comment.