src: rename PROVIDER_FSREQWRAP to PROVIDER_FSREQCALLBACK
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
172b4d7ceb
commit
f479050916
@ -39,7 +39,7 @@ namespace node {
|
||||
V(FILEHANDLE) \
|
||||
V(FILEHANDLECLOSEREQ) \
|
||||
V(FSEVENTWRAP) \
|
||||
V(FSREQWRAP) \
|
||||
V(FSREQCALLBACK) \
|
||||
V(FSREQPROMISE) \
|
||||
V(GETADDRINFOREQWRAP) \
|
||||
V(GETNAMEINFOREQWRAP) \
|
||||
|
@ -269,7 +269,7 @@ void FileHandle::AfterClose() {
|
||||
|
||||
|
||||
FileHandleReadWrap::FileHandleReadWrap(FileHandle* handle, Local<Object> obj)
|
||||
: ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQWRAP),
|
||||
: ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQCALLBACK),
|
||||
file_handle_(handle) {}
|
||||
|
||||
int FileHandle::ReadStart() {
|
||||
|
@ -88,7 +88,7 @@ class FSReqBase : public ReqWrap<uv_fs_t> {
|
||||
class FSReqCallback : public FSReqBase {
|
||||
public:
|
||||
FSReqCallback(Environment* env, Local<Object> req, bool use_bigint)
|
||||
: FSReqBase(env, req, AsyncWrap::PROVIDER_FSREQWRAP, use_bigint) { }
|
||||
: FSReqBase(env, req, AsyncWrap::PROVIDER_FSREQCALLBACK, use_bigint) { }
|
||||
|
||||
void Reject(Local<Value> reject) override;
|
||||
void Resolve(Local<Value> value) override;
|
||||
|
@ -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 |
|
||||
|
@ -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');
|
@ -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');
|
@ -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' } ]
|
||||
);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class TestReqWrap : public node::ReqWrap<uv_req_t> {
|
||||
TestReqWrap(node::Environment* env, v8::Local<v8::Object> object)
|
||||
: node::ReqWrap<uv_req_t>(env,
|
||||
object,
|
||||
node::AsyncWrap::PROVIDER_FSREQWRAP) {}
|
||||
node::AsyncWrap::PROVIDER_FSREQCALLBACK) {}
|
||||
};
|
||||
|
||||
TEST_F(DebugSymbolsTest, ContextEmbedderEnvironmentIndex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user