| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2aa8654 commit 6c6ffdd
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,7 @@ const fs = require('fs'); | |||
| 7 | 7 | let nestedCall = false; | |
| 8 | 8 | ||
| 9 | 9 | async_hooks.createHook({ | |
| 10 | - init: common.mustCall(function() { | ||
| 10 | + init: common.mustCall(() => { | ||
| 11 | 11 | nestedHook.disable(); | |
| 12 | 12 | if (!nestedCall) { | |
| 13 | 13 | nestedCall = true; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,19 +11,19 @@ const http = require('http'); | |||
| 11 | 11 | const hooks = initHooks(); | |
| 12 | 12 | hooks.enable(); | |
| 13 | 13 | ||
| 14 | - const server = http.createServer(common.mustCall(function(req, res) { | ||
| 14 | + const server = http.createServer(common.mustCall((req, res) => { | ||
| 15 | 15 | res.end(); | |
| 16 | - this.close(common.mustCall()); | ||
| 16 | + server.close(common.mustCall()); | ||
| 17 | 17 | })); | |
| 18 | - server.listen(0, common.mustCall(function() { | ||
| 18 | + server.listen(0, common.mustCall(() => { | ||
| 19 | 19 | http.get({ | |
| 20 | 20 | host: '::1', | |
| 21 | 21 | family: 6, | |
| 22 | 22 | port: server.address().port | |
| 23 | 23 | }, common.mustCall()); | |
| 24 | 24 | })); | |
| 25 | 25 | ||
| 26 | - process.on('exit', function() { | ||
| 26 | + process.on('exit', () => { | ||
| 27 | 27 | hooks.disable(); | |
| 28 | 28 | ||
| 29 | 29 | verifyGraph( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,9 +12,9 @@ tmpdir.refresh(); | |||
| 12 | 12 | const hooks = initHooks(); | |
| 13 | 13 | hooks.enable(); | |
| 14 | 14 | ||
| 15 | - net.createServer(function(c) { | ||
| 15 | + const server = net.createServer((c) => { | ||
| 16 | 16 | c.end(); | |
| 17 | - this.close(); | ||
| 17 | + server.close(); | ||
| 18 | 18 | }).listen(common.PIPE, common.mustCall(onlisten)); | |
| 19 | 19 | ||
| 20 | 20 | function onlisten() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,11 +14,11 @@ hooks.enable(); | |||
| 14 | 14 | ||
| 15 | 15 | const rootAsyncId = async_hooks.executionAsyncId(); | |
| 16 | 16 | ||
| 17 | - process.nextTick(common.mustCall(function() { | ||
| 17 | + process.nextTick(common.mustCall(() => { | ||
| 18 | 18 | assert.strictEqual(async_hooks.triggerAsyncId(), rootAsyncId); | |
| 19 | 19 | })); | |
| 20 | 20 | ||
| 21 | - process.on('exit', function() { | ||
| 21 | + process.on('exit', () => { | ||
| 22 | 22 | hooks.sanityCheck(); | |
| 23 | 23 | ||
| 24 | 24 | const as = hooks.activitiesOfTypes('TickObject'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,9 +17,9 @@ let pipe1, pipe2; | |||
| 17 | 17 | let pipeserver; | |
| 18 | 18 | let pipeconnect; | |
| 19 | 19 | ||
| 20 | - net.createServer(common.mustCall(function(c) { | ||
| 20 | + const server = net.createServer(common.mustCall((c) => { | ||
| 21 | 21 | c.end(); | |
| 22 | - this.close(); | ||
| 22 | + server.close(); | ||
| 23 | 23 | process.nextTick(maybeOnconnect.bind(null, 'server')); | |
| 24 | 24 | })).listen(common.PIPE, common.mustCall(onlisten)); | |
| 25 | 25 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,11 +11,11 @@ hooks.enable(); | |||
| 11 | 11 | ||
| 12 | 12 | const rootAsyncId = async_hooks.executionAsyncId(); | |
| 13 | 13 | ||
| 14 | - queueMicrotask(common.mustCall(function() { | ||
| 14 | + queueMicrotask(common.mustCall(() => { | ||
| 15 | 15 | assert.strictEqual(async_hooks.triggerAsyncId(), rootAsyncId); | |
| 16 | 16 | })); | |
| 17 | 17 | ||
| 18 | - process.on('exit', function() { | ||
| 18 | + process.on('exit', () => { | ||
| 19 | 19 | hooks.sanityCheck(); | |
| 20 | 20 | ||
| 21 | 21 | const as = hooks.activitiesOfTypes('Microtask'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments