Skip to content

Commit f479050

Browse files
committed
src: rename PROVIDER_FSREQWRAP to PROVIDER_FSREQCALLBACK
PR-URL: #21971 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 172b4d7 commit f479050

8 files changed

+43
-43
lines changed

src/async_wrap.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace node {
3939
V(FILEHANDLE) \
4040
V(FILEHANDLECLOSEREQ) \
4141
V(FSEVENTWRAP) \
42-
V(FSREQWRAP) \
42+
V(FSREQCALLBACK) \
4343
V(FSREQPROMISE) \
4444
V(GETADDRINFOREQWRAP) \
4545
V(GETNAMEINFOREQWRAP) \

src/node_file.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void FileHandle::AfterClose() {
269269

270270

271271
FileHandleReadWrap::FileHandleReadWrap(FileHandle* handle, Local<Object> obj)
272-
: ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQWRAP),
272+
: ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQCALLBACK),
273273
file_handle_(handle) {}
274274

275275
int FileHandle::ReadStart() {

src/node_file.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class FSReqBase : public ReqWrap<uv_fs_t> {
8888
class FSReqCallback : public FSReqBase {
8989
public:
9090
FSReqCallback(Environment* env, Local<Object> req, bool use_bigint)
91-
: FSReqBase(env, req, AsyncWrap::PROVIDER_FSREQWRAP, use_bigint) { }
91+
: FSReqBase(env, req, AsyncWrap::PROVIDER_FSREQCALLBACK, use_bigint) { }
9292

9393
void Reject(Local<Value> reject) override;
9494
void Resolve(Local<Value> value) override;

test/async-hooks/coverage.md

+27-27
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
Showing which kind of async resource is covered by which test:
44

5-
| Resource Type | Test |
6-
|----------------------|----------------------------------------|
7-
| CONNECTION | test-connection.ssl.js |
8-
| FSEVENTWRAP | test-fseventwrap.js |
9-
| FSREQWRAP | test-fsreqwrap-{access,readFile}.js |
10-
| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js |
11-
| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js |
12-
| HTTPPARSER | test-httpparser.{request,response}.js |
13-
| Immediate | test-immediate.js |
14-
| JSSTREAM | TODO (crashes when accessing directly) |
15-
| PBKDF2REQUEST | test-crypto-pbkdf2.js |
16-
| PIPECONNECTWRAP | test-pipeconnectwrap.js |
17-
| PIPEWRAP | test-pipewrap.js |
18-
| PROCESSWRAP | test-pipewrap.js |
19-
| QUERYWRAP | test-querywrap.js |
20-
| RANDOMBYTESREQUEST | test-crypto-randomBytes.js |
21-
| SHUTDOWNWRAP | test-shutdownwrap.js |
22-
| SIGNALWRAP | test-signalwrap.js |
23-
| STATWATCHER | test-statwatcher.js |
24-
| TCPCONNECTWRAP | test-tcpwrap.js |
25-
| TCPWRAP | test-tcpwrap.js |
26-
| TLSWRAP | test-tlswrap.js |
27-
| TTYWRAP | test-ttywrap.{read,write}stream.js |
28-
| UDPSENDWRAP | test-udpsendwrap.js |
29-
| UDPWRAP | test-udpwrap.js |
30-
| WRITEWRAP | test-writewrap.js |
31-
| ZLIB | test-zlib.zlib-binding.deflate.js |
5+
| Resource Type | Test |
6+
|----------------------|--------------------------------------------|
7+
| CONNECTION | test-connection.ssl.js |
8+
| FSEVENTWRAP | test-fseventwrap.js |
9+
| FSREQCALLBACK | test-fsreqcallback-{access,readFile}.js |
10+
| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js |
11+
| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js |
12+
| HTTPPARSER | test-httpparser.{request,response}.js |
13+
| Immediate | test-immediate.js |
14+
| JSSTREAM | TODO (crashes when accessing directly) |
15+
| PBKDF2REQUEST | test-crypto-pbkdf2.js |
16+
| PIPECONNECTWRAP | test-pipeconnectwrap.js |
17+
| PIPEWRAP | test-pipewrap.js |
18+
| PROCESSWRAP | test-pipewrap.js |
19+
| QUERYWRAP | test-querywrap.js |
20+
| RANDOMBYTESREQUEST | test-crypto-randomBytes.js |
21+
| SHUTDOWNWRAP | test-shutdownwrap.js |
22+
| SIGNALWRAP | test-signalwrap.js |
23+
| STATWATCHER | test-statwatcher.js |
24+
| TCPCONNECTWRAP | test-tcpwrap.js |
25+
| TCPWRAP | test-tcpwrap.js |
26+
| TLSWRAP | test-tlswrap.js |
27+
| TTYWRAP | test-ttywrap.{read,write}stream.js |
28+
| UDPSENDWRAP | test-udpsendwrap.js |
29+
| UDPWRAP | test-udpwrap.js |
30+
| WRITEWRAP | test-writewrap.js |
31+
| ZLIB | test-zlib.zlib-binding.deflate.js |

test/async-hooks/test-fsreqwrap-access.js test/async-hooks/test-fsreqcallback-access.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ hooks.enable();
1313
fs.access(__filename, common.mustCall(onaccess));
1414

1515
function onaccess() {
16-
const as = hooks.activitiesOfTypes('FSREQWRAP');
16+
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
1717
const a = as[0];
1818
checkInvocations(a, { init: 1, before: 1 },
1919
'while in onaccess callback');
@@ -24,13 +24,13 @@ process.on('exit', onexit);
2424

2525
function onexit() {
2626
hooks.disable();
27-
hooks.sanityCheck('FSREQWRAP');
27+
hooks.sanityCheck('FSREQCALLBACK');
2828

29-
const as = hooks.activitiesOfTypes('FSREQWRAP');
29+
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
3030
assert.strictEqual(as.length, 1);
3131

3232
const a = as[0];
33-
assert.strictEqual(a.type, 'FSREQWRAP');
33+
assert.strictEqual(a.type, 'FSREQCALLBACK');
3434
assert.strictEqual(typeof a.uid, 'number');
3535
checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
3636
'when process exits');

test/async-hooks/test-fsreqwrap-readFile.js test/async-hooks/test-fsreqcallback-readFile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ hooks.enable();
1616
fs.readFile(__filename, common.mustCall(onread));
1717

1818
function onread() {
19-
const as = hooks.activitiesOfTypes('FSREQWRAP');
19+
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
2020
let lastParent = 1;
2121
for (let i = 0; i < as.length; i++) {
2222
const a = as[i];
23-
assert.strictEqual(a.type, 'FSREQWRAP');
23+
assert.strictEqual(a.type, 'FSREQCALLBACK');
2424
assert.strictEqual(typeof a.uid, 'number');
2525
assert.strictEqual(a.triggerAsyncId, lastParent);
2626
lastParent = a.uid;
@@ -43,8 +43,8 @@ process.on('exit', onexit);
4343

4444
function onexit() {
4545
hooks.disable();
46-
hooks.sanityCheck('FSREQWRAP');
47-
const as = hooks.activitiesOfTypes('FSREQWRAP');
46+
hooks.sanityCheck('FSREQCALLBACK');
47+
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
4848
const a = as.pop();
4949
checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
5050
'when process exits');

test/async-hooks/test-graph.fsreq-readFile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ function onexit() {
1818
hooks.disable();
1919
verifyGraph(
2020
hooks,
21-
[ { type: 'FSREQWRAP', id: 'fsreq:1', triggerAsyncId: null },
22-
{ type: 'FSREQWRAP', id: 'fsreq:2', triggerAsyncId: 'fsreq:1' },
23-
{ type: 'FSREQWRAP', id: 'fsreq:3', triggerAsyncId: 'fsreq:2' },
24-
{ type: 'FSREQWRAP', id: 'fsreq:4', triggerAsyncId: 'fsreq:3' } ]
21+
[ { type: 'FSREQCALLBACK', id: 'fsreq:1', triggerAsyncId: null },
22+
{ type: 'FSREQCALLBACK', id: 'fsreq:2', triggerAsyncId: 'fsreq:1' },
23+
{ type: 'FSREQCALLBACK', id: 'fsreq:3', triggerAsyncId: 'fsreq:2' },
24+
{ type: 'FSREQCALLBACK', id: 'fsreq:4', triggerAsyncId: 'fsreq:3' } ]
2525
);
2626
}

test/cctest/test_node_postmortem_metadata.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TestReqWrap : public node::ReqWrap<uv_req_t> {
5757
TestReqWrap(node::Environment* env, v8::Local<v8::Object> object)
5858
: node::ReqWrap<uv_req_t>(env,
5959
object,
60-
node::AsyncWrap::PROVIDER_FSREQWRAP) {}
60+
node::AsyncWrap::PROVIDER_FSREQCALLBACK) {}
6161
};
6262

6363
TEST_F(DebugSymbolsTest, ContextEmbedderEnvironmentIndex) {

0 commit comments

Comments
 (0)