Skip to content

Commit

Permalink
fixup rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR committed Jul 3, 2017
1 parent e4cd110 commit 795358a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ const init_symbol = Symbol('init');
const before_symbol = Symbol('before');
const after_symbol = Symbol('after');
const destroy_symbol = Symbol('destroy');
const emitBeforeN = emitHookFactory(before_symbol, 'emitBeforeN');
const emitAfterN = emitHookFactory(after_symbol, 'emitAfterN');
const emitDestroyN = emitHookFactory(destroy_symbol, 'emitDestroyN');
const emitBeforeNative = emitHookFactory(before_symbol, 'emitBeforeNative');
const emitAfterNative = emitHookFactory(after_symbol, 'emitAfterNative');
const emitDestroyNative = emitHookFactory(destroy_symbol, 'emitDestroyNative');

// Setup the callbacks that node::AsyncWrap will call when there are hooks to
// process. They use the same functions as the JS embedder API. These callbacks
// are setup immediately to prevent async_wrap.setupHooks() from being hijacked
// and the cost of doing so is negligible.
async_wrap.setupHooks({ init,
before: emitBeforeN,
after: emitAfterN,
destroy: emitDestroyN });
before: emitBeforeNative,
after: emitAfterNative,
destroy: emitDestroyNative });

// Used to fatally abort the process if a callback throws.
function fatalError(e) {
Expand Down Expand Up @@ -391,7 +391,7 @@ function emitBeforeS(asyncId, triggerAsyncId = asyncId) {

if (async_hook_fields[kBefore] === 0)
return;
emitBeforeN(asyncId);
emitBeforeNative(asyncId);
}


Expand All @@ -400,7 +400,7 @@ function emitBeforeS(asyncId, triggerAsyncId = asyncId) {
// after callbacks.
function emitAfterS(asyncId) {
if (async_hook_fields[kAfter] > 0)
emitAfterN(asyncId);
emitAfterNative(asyncId);

popAsyncIds(asyncId);
}
Expand Down

0 comments on commit 795358a

Please sign in to comment.