mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
848ae89d79
Remove unused function arguments. Convert to ES6 arrow syntax. PR-URL: https://github.com/nodejs/node/pull/24976 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
23 lines
473 B
JavaScript
23 lines
473 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const async_hooks = require('async_hooks');
|
|
const fs = require('fs');
|
|
|
|
const nestedHook = async_hooks.createHook({
|
|
init: common.mustNotCall()
|
|
});
|
|
let nestedCall = false;
|
|
|
|
async_hooks.createHook({
|
|
init: common.mustCall(() => {
|
|
nestedHook.enable();
|
|
if (!nestedCall) {
|
|
nestedCall = true;
|
|
fs.access(__filename, common.mustCall());
|
|
}
|
|
}, 2)
|
|
}).enable();
|
|
|
|
fs.access(__filename, common.mustCall());
|