Skip to content

Commit

Permalink
fixup add comment about naming fn
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR committed Jul 3, 2017
1 parent 795358a commit fc397f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ function emitHookFactory(symbol, name) {
restoreTmpHooks();
}
};
// Set the name property of the anonymous function as it looks good in the
// stack trace.
Object.defineProperty(fn, 'name', {
value: name
});
Expand Down

0 comments on commit fc397f8

Please sign in to comment.