diff --git a/src/async_wrap.h b/src/async_wrap.h index fed05ab021b3ca..60078ee0932ca9 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -39,7 +39,7 @@ namespace node { V(FILEHANDLE) \ V(FILEHANDLECLOSEREQ) \ V(FSEVENTWRAP) \ - V(FSREQWRAP) \ + V(FSREQCALLBACK) \ V(FSREQPROMISE) \ V(GETADDRINFOREQWRAP) \ V(GETNAMEINFOREQWRAP) \ diff --git a/src/node_file.cc b/src/node_file.cc index 9303bcc3035fd7..b0effaff7bb746 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -269,7 +269,7 @@ void FileHandle::AfterClose() { FileHandleReadWrap::FileHandleReadWrap(FileHandle* handle, Local obj) - : ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQWRAP), + : ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQCALLBACK), file_handle_(handle) {} int FileHandle::ReadStart() { diff --git a/src/node_file.h b/src/node_file.h index 049074e111ac65..fdd36efc77582b 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -88,7 +88,7 @@ class FSReqBase : public ReqWrap { class FSReqCallback : public FSReqBase { public: FSReqCallback(Environment* env, Local req, bool use_bigint) - : FSReqBase(env, req, AsyncWrap::PROVIDER_FSREQWRAP, use_bigint) { } + : FSReqBase(env, req, AsyncWrap::PROVIDER_FSREQCALLBACK, use_bigint) { } void Reject(Local reject) override; void Resolve(Local value) override; diff --git a/test/async-hooks/coverage.md b/test/async-hooks/coverage.md index 7352c4a84001f8..4ac7bc24a58bb4 100644 --- a/test/async-hooks/coverage.md +++ b/test/async-hooks/coverage.md @@ -2,30 +2,30 @@ Showing which kind of async resource is covered by which test: -| Resource Type | Test | -|----------------------|----------------------------------------| -| CONNECTION | test-connection.ssl.js | -| FSEVENTWRAP | test-fseventwrap.js | -| FSREQWRAP | test-fsreqwrap-{access,readFile}.js | -| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js | -| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js | -| HTTPPARSER | test-httpparser.{request,response}.js | -| Immediate | test-immediate.js | -| JSSTREAM | TODO (crashes when accessing directly) | -| PBKDF2REQUEST | test-crypto-pbkdf2.js | -| PIPECONNECTWRAP | test-pipeconnectwrap.js | -| PIPEWRAP | test-pipewrap.js | -| PROCESSWRAP | test-pipewrap.js | -| QUERYWRAP | test-querywrap.js | -| RANDOMBYTESREQUEST | test-crypto-randomBytes.js | -| SHUTDOWNWRAP | test-shutdownwrap.js | -| SIGNALWRAP | test-signalwrap.js | -| STATWATCHER | test-statwatcher.js | -| TCPCONNECTWRAP | test-tcpwrap.js | -| TCPWRAP | test-tcpwrap.js | -| TLSWRAP | test-tlswrap.js | -| TTYWRAP | test-ttywrap.{read,write}stream.js | -| UDPSENDWRAP | test-udpsendwrap.js | -| UDPWRAP | test-udpwrap.js | -| WRITEWRAP | test-writewrap.js | -| ZLIB | test-zlib.zlib-binding.deflate.js | +| Resource Type | Test | +|----------------------|--------------------------------------------| +| CONNECTION | test-connection.ssl.js | +| FSEVENTWRAP | test-fseventwrap.js | +| FSREQCALLBACK | test-fsreqcallback-{access,readFile}.js | +| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js | +| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js | +| HTTPPARSER | test-httpparser.{request,response}.js | +| Immediate | test-immediate.js | +| JSSTREAM | TODO (crashes when accessing directly) | +| PBKDF2REQUEST | test-crypto-pbkdf2.js | +| PIPECONNECTWRAP | test-pipeconnectwrap.js | +| PIPEWRAP | test-pipewrap.js | +| PROCESSWRAP | test-pipewrap.js | +| QUERYWRAP | test-querywrap.js | +| RANDOMBYTESREQUEST | test-crypto-randomBytes.js | +| SHUTDOWNWRAP | test-shutdownwrap.js | +| SIGNALWRAP | test-signalwrap.js | +| STATWATCHER | test-statwatcher.js | +| TCPCONNECTWRAP | test-tcpwrap.js | +| TCPWRAP | test-tcpwrap.js | +| TLSWRAP | test-tlswrap.js | +| TTYWRAP | test-ttywrap.{read,write}stream.js | +| UDPSENDWRAP | test-udpsendwrap.js | +| UDPWRAP | test-udpwrap.js | +| WRITEWRAP | test-writewrap.js | +| ZLIB | test-zlib.zlib-binding.deflate.js | diff --git a/test/async-hooks/test-fsreqwrap-access.js b/test/async-hooks/test-fsreqcallback-access.js similarity index 79% rename from test/async-hooks/test-fsreqwrap-access.js rename to test/async-hooks/test-fsreqcallback-access.js index 2b31f2512d6b9c..8983a3dcdf243f 100644 --- a/test/async-hooks/test-fsreqwrap-access.js +++ b/test/async-hooks/test-fsreqcallback-access.js @@ -13,7 +13,7 @@ hooks.enable(); fs.access(__filename, common.mustCall(onaccess)); function onaccess() { - const as = hooks.activitiesOfTypes('FSREQWRAP'); + const as = hooks.activitiesOfTypes('FSREQCALLBACK'); const a = as[0]; checkInvocations(a, { init: 1, before: 1 }, 'while in onaccess callback'); @@ -24,13 +24,13 @@ process.on('exit', onexit); function onexit() { hooks.disable(); - hooks.sanityCheck('FSREQWRAP'); + hooks.sanityCheck('FSREQCALLBACK'); - const as = hooks.activitiesOfTypes('FSREQWRAP'); + const as = hooks.activitiesOfTypes('FSREQCALLBACK'); assert.strictEqual(as.length, 1); const a = as[0]; - assert.strictEqual(a.type, 'FSREQWRAP'); + assert.strictEqual(a.type, 'FSREQCALLBACK'); assert.strictEqual(typeof a.uid, 'number'); checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 }, 'when process exits'); diff --git a/test/async-hooks/test-fsreqwrap-readFile.js b/test/async-hooks/test-fsreqcallback-readFile.js similarity index 88% rename from test/async-hooks/test-fsreqwrap-readFile.js rename to test/async-hooks/test-fsreqcallback-readFile.js index 064cd80a48279e..8301835ec8153f 100644 --- a/test/async-hooks/test-fsreqwrap-readFile.js +++ b/test/async-hooks/test-fsreqcallback-readFile.js @@ -16,11 +16,11 @@ hooks.enable(); fs.readFile(__filename, common.mustCall(onread)); function onread() { - const as = hooks.activitiesOfTypes('FSREQWRAP'); + const as = hooks.activitiesOfTypes('FSREQCALLBACK'); let lastParent = 1; for (let i = 0; i < as.length; i++) { const a = as[i]; - assert.strictEqual(a.type, 'FSREQWRAP'); + assert.strictEqual(a.type, 'FSREQCALLBACK'); assert.strictEqual(typeof a.uid, 'number'); assert.strictEqual(a.triggerAsyncId, lastParent); lastParent = a.uid; @@ -43,8 +43,8 @@ process.on('exit', onexit); function onexit() { hooks.disable(); - hooks.sanityCheck('FSREQWRAP'); - const as = hooks.activitiesOfTypes('FSREQWRAP'); + hooks.sanityCheck('FSREQCALLBACK'); + const as = hooks.activitiesOfTypes('FSREQCALLBACK'); const a = as.pop(); checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 }, 'when process exits'); diff --git a/test/async-hooks/test-graph.fsreq-readFile.js b/test/async-hooks/test-graph.fsreq-readFile.js index f9c476ca0b10fc..0a310ed5774a67 100644 --- a/test/async-hooks/test-graph.fsreq-readFile.js +++ b/test/async-hooks/test-graph.fsreq-readFile.js @@ -18,9 +18,9 @@ function onexit() { hooks.disable(); verifyGraph( hooks, - [ { type: 'FSREQWRAP', id: 'fsreq:1', triggerAsyncId: null }, - { type: 'FSREQWRAP', id: 'fsreq:2', triggerAsyncId: 'fsreq:1' }, - { type: 'FSREQWRAP', id: 'fsreq:3', triggerAsyncId: 'fsreq:2' }, - { type: 'FSREQWRAP', id: 'fsreq:4', triggerAsyncId: 'fsreq:3' } ] + [ { type: 'FSREQCALLBACK', id: 'fsreq:1', triggerAsyncId: null }, + { type: 'FSREQCALLBACK', id: 'fsreq:2', triggerAsyncId: 'fsreq:1' }, + { type: 'FSREQCALLBACK', id: 'fsreq:3', triggerAsyncId: 'fsreq:2' }, + { type: 'FSREQCALLBACK', id: 'fsreq:4', triggerAsyncId: 'fsreq:3' } ] ); } diff --git a/test/cctest/test_node_postmortem_metadata.cc b/test/cctest/test_node_postmortem_metadata.cc index e9acd629f35f91..8e8cbabf000f2e 100644 --- a/test/cctest/test_node_postmortem_metadata.cc +++ b/test/cctest/test_node_postmortem_metadata.cc @@ -57,7 +57,7 @@ class TestReqWrap : public node::ReqWrap { TestReqWrap(node::Environment* env, v8::Local object) : node::ReqWrap(env, object, - node::AsyncWrap::PROVIDER_FSREQWRAP) {} + node::AsyncWrap::PROVIDER_FSREQCALLBACK) {} }; TEST_F(DebugSymbolsTest, ContextEmbedderEnvironmentIndex) {