mirror of https://github.com/lukechilds/node.git
Browse Source
This fixes an error that could occure by nesting async_hooks calls PR-URL: https://github.com/nodejs/node/pull/14054 Ref: https://github.com/nodejs/node/pull/13755#issuecomment-312616004 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>v6
Ruben Bridgewater
7 years ago
committed by
Andreas Madsen
2 changed files with 24 additions and 5 deletions
@ -0,0 +1,19 @@ |
|||
'use strict'; |
|||
|
|||
const common = require('../common'); |
|||
const async_hooks = require('async_hooks'); |
|||
const fs = require('fs'); |
|||
|
|||
const nestedHook = async_hooks.createHook({ |
|||
init: common.mustCall() |
|||
}); |
|||
|
|||
async_hooks.createHook({ |
|||
init: common.mustCall((id, type) => { |
|||
nestedHook.enable(); |
|||
}, 2) |
|||
}).enable(); |
|||
|
|||
fs.access(__filename, common.mustCall(() => { |
|||
fs.access(__filename, common.mustCall()); |
|||
})); |
Loading…
Reference in new issue