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(FILEHANDLE) \
|
||||||
V(FILEHANDLECLOSEREQ) \
|
V(FILEHANDLECLOSEREQ) \
|
||||||
V(FSEVENTWRAP) \
|
V(FSEVENTWRAP) \
|
||||||
V(FSREQWRAP) \
|
V(FSREQCALLBACK) \
|
||||||
V(FSREQPROMISE) \
|
V(FSREQPROMISE) \
|
||||||
V(GETADDRINFOREQWRAP) \
|
V(GETADDRINFOREQWRAP) \
|
||||||
V(GETNAMEINFOREQWRAP) \
|
V(GETNAMEINFOREQWRAP) \
|
||||||
|
@ -269,7 +269,7 @@ void FileHandle::AfterClose() {
|
|||||||
|
|
||||||
|
|
||||||
FileHandleReadWrap::FileHandleReadWrap(FileHandle* handle, Local<Object> obj)
|
FileHandleReadWrap::FileHandleReadWrap(FileHandle* handle, Local<Object> obj)
|
||||||
: ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQWRAP),
|
: ReqWrap(handle->env(), obj, AsyncWrap::PROVIDER_FSREQCALLBACK),
|
||||||
file_handle_(handle) {}
|
file_handle_(handle) {}
|
||||||
|
|
||||||
int FileHandle::ReadStart() {
|
int FileHandle::ReadStart() {
|
||||||
|
@ -88,7 +88,7 @@ class FSReqBase : public ReqWrap<uv_fs_t> {
|
|||||||
class FSReqCallback : public FSReqBase {
|
class FSReqCallback : public FSReqBase {
|
||||||
public:
|
public:
|
||||||
FSReqCallback(Environment* env, Local<Object> req, bool use_bigint)
|
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 Reject(Local<Value> reject) override;
|
||||||
void Resolve(Local<Value> value) override;
|
void Resolve(Local<Value> value) override;
|
||||||
|
@ -2,30 +2,30 @@
|
|||||||
|
|
||||||
Showing which kind of async resource is covered by which test:
|
Showing which kind of async resource is covered by which test:
|
||||||
|
|
||||||
| Resource Type | Test |
|
| Resource Type | Test |
|
||||||
|----------------------|----------------------------------------|
|
|----------------------|--------------------------------------------|
|
||||||
| CONNECTION | test-connection.ssl.js |
|
| CONNECTION | test-connection.ssl.js |
|
||||||
| FSEVENTWRAP | test-fseventwrap.js |
|
| FSEVENTWRAP | test-fseventwrap.js |
|
||||||
| FSREQWRAP | test-fsreqwrap-{access,readFile}.js |
|
| FSREQCALLBACK | test-fsreqcallback-{access,readFile}.js |
|
||||||
| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js |
|
| GETADDRINFOREQWRAP | test-getaddrinforeqwrap.js |
|
||||||
| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js |
|
| GETNAMEINFOREQWRAP | test-getnameinforeqwrap.js |
|
||||||
| HTTPPARSER | test-httpparser.{request,response}.js |
|
| HTTPPARSER | test-httpparser.{request,response}.js |
|
||||||
| Immediate | test-immediate.js |
|
| Immediate | test-immediate.js |
|
||||||
| JSSTREAM | TODO (crashes when accessing directly) |
|
| JSSTREAM | TODO (crashes when accessing directly) |
|
||||||
| PBKDF2REQUEST | test-crypto-pbkdf2.js |
|
| PBKDF2REQUEST | test-crypto-pbkdf2.js |
|
||||||
| PIPECONNECTWRAP | test-pipeconnectwrap.js |
|
| PIPECONNECTWRAP | test-pipeconnectwrap.js |
|
||||||
| PIPEWRAP | test-pipewrap.js |
|
| PIPEWRAP | test-pipewrap.js |
|
||||||
| PROCESSWRAP | test-pipewrap.js |
|
| PROCESSWRAP | test-pipewrap.js |
|
||||||
| QUERYWRAP | test-querywrap.js |
|
| QUERYWRAP | test-querywrap.js |
|
||||||
| RANDOMBYTESREQUEST | test-crypto-randomBytes.js |
|
| RANDOMBYTESREQUEST | test-crypto-randomBytes.js |
|
||||||
| SHUTDOWNWRAP | test-shutdownwrap.js |
|
| SHUTDOWNWRAP | test-shutdownwrap.js |
|
||||||
| SIGNALWRAP | test-signalwrap.js |
|
| SIGNALWRAP | test-signalwrap.js |
|
||||||
| STATWATCHER | test-statwatcher.js |
|
| STATWATCHER | test-statwatcher.js |
|
||||||
| TCPCONNECTWRAP | test-tcpwrap.js |
|
| TCPCONNECTWRAP | test-tcpwrap.js |
|
||||||
| TCPWRAP | test-tcpwrap.js |
|
| TCPWRAP | test-tcpwrap.js |
|
||||||
| TLSWRAP | test-tlswrap.js |
|
| TLSWRAP | test-tlswrap.js |
|
||||||
| TTYWRAP | test-ttywrap.{read,write}stream.js |
|
| TTYWRAP | test-ttywrap.{read,write}stream.js |
|
||||||
| UDPSENDWRAP | test-udpsendwrap.js |
|
| UDPSENDWRAP | test-udpsendwrap.js |
|
||||||
| UDPWRAP | test-udpwrap.js |
|
| UDPWRAP | test-udpwrap.js |
|
||||||
| WRITEWRAP | test-writewrap.js |
|
| WRITEWRAP | test-writewrap.js |
|
||||||
| ZLIB | test-zlib.zlib-binding.deflate.js |
|
| ZLIB | test-zlib.zlib-binding.deflate.js |
|
||||||
|
@ -13,7 +13,7 @@ hooks.enable();
|
|||||||
fs.access(__filename, common.mustCall(onaccess));
|
fs.access(__filename, common.mustCall(onaccess));
|
||||||
|
|
||||||
function onaccess() {
|
function onaccess() {
|
||||||
const as = hooks.activitiesOfTypes('FSREQWRAP');
|
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
|
||||||
const a = as[0];
|
const a = as[0];
|
||||||
checkInvocations(a, { init: 1, before: 1 },
|
checkInvocations(a, { init: 1, before: 1 },
|
||||||
'while in onaccess callback');
|
'while in onaccess callback');
|
||||||
@ -24,13 +24,13 @@ process.on('exit', onexit);
|
|||||||
|
|
||||||
function onexit() {
|
function onexit() {
|
||||||
hooks.disable();
|
hooks.disable();
|
||||||
hooks.sanityCheck('FSREQWRAP');
|
hooks.sanityCheck('FSREQCALLBACK');
|
||||||
|
|
||||||
const as = hooks.activitiesOfTypes('FSREQWRAP');
|
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
|
||||||
assert.strictEqual(as.length, 1);
|
assert.strictEqual(as.length, 1);
|
||||||
|
|
||||||
const a = as[0];
|
const a = as[0];
|
||||||
assert.strictEqual(a.type, 'FSREQWRAP');
|
assert.strictEqual(a.type, 'FSREQCALLBACK');
|
||||||
assert.strictEqual(typeof a.uid, 'number');
|
assert.strictEqual(typeof a.uid, 'number');
|
||||||
checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
|
checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
|
||||||
'when process exits');
|
'when process exits');
|
@ -16,11 +16,11 @@ hooks.enable();
|
|||||||
fs.readFile(__filename, common.mustCall(onread));
|
fs.readFile(__filename, common.mustCall(onread));
|
||||||
|
|
||||||
function onread() {
|
function onread() {
|
||||||
const as = hooks.activitiesOfTypes('FSREQWRAP');
|
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
|
||||||
let lastParent = 1;
|
let lastParent = 1;
|
||||||
for (let i = 0; i < as.length; i++) {
|
for (let i = 0; i < as.length; i++) {
|
||||||
const a = as[i];
|
const a = as[i];
|
||||||
assert.strictEqual(a.type, 'FSREQWRAP');
|
assert.strictEqual(a.type, 'FSREQCALLBACK');
|
||||||
assert.strictEqual(typeof a.uid, 'number');
|
assert.strictEqual(typeof a.uid, 'number');
|
||||||
assert.strictEqual(a.triggerAsyncId, lastParent);
|
assert.strictEqual(a.triggerAsyncId, lastParent);
|
||||||
lastParent = a.uid;
|
lastParent = a.uid;
|
||||||
@ -43,8 +43,8 @@ process.on('exit', onexit);
|
|||||||
|
|
||||||
function onexit() {
|
function onexit() {
|
||||||
hooks.disable();
|
hooks.disable();
|
||||||
hooks.sanityCheck('FSREQWRAP');
|
hooks.sanityCheck('FSREQCALLBACK');
|
||||||
const as = hooks.activitiesOfTypes('FSREQWRAP');
|
const as = hooks.activitiesOfTypes('FSREQCALLBACK');
|
||||||
const a = as.pop();
|
const a = as.pop();
|
||||||
checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
|
checkInvocations(a, { init: 1, before: 1, after: 1, destroy: 1 },
|
||||||
'when process exits');
|
'when process exits');
|
@ -18,9 +18,9 @@ function onexit() {
|
|||||||
hooks.disable();
|
hooks.disable();
|
||||||
verifyGraph(
|
verifyGraph(
|
||||||
hooks,
|
hooks,
|
||||||
[ { type: 'FSREQWRAP', id: 'fsreq:1', triggerAsyncId: null },
|
[ { type: 'FSREQCALLBACK', id: 'fsreq:1', triggerAsyncId: null },
|
||||||
{ type: 'FSREQWRAP', id: 'fsreq:2', triggerAsyncId: 'fsreq:1' },
|
{ type: 'FSREQCALLBACK', id: 'fsreq:2', triggerAsyncId: 'fsreq:1' },
|
||||||
{ type: 'FSREQWRAP', id: 'fsreq:3', triggerAsyncId: 'fsreq:2' },
|
{ type: 'FSREQCALLBACK', id: 'fsreq:3', triggerAsyncId: 'fsreq:2' },
|
||||||
{ type: 'FSREQWRAP', id: 'fsreq:4', triggerAsyncId: 'fsreq:3' } ]
|
{ 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)
|
TestReqWrap(node::Environment* env, v8::Local<v8::Object> object)
|
||||||
: node::ReqWrap<uv_req_t>(env,
|
: node::ReqWrap<uv_req_t>(env,
|
||||||
object,
|
object,
|
||||||
node::AsyncWrap::PROVIDER_FSREQWRAP) {}
|
node::AsyncWrap::PROVIDER_FSREQCALLBACK) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(DebugSymbolsTest, ContextEmbedderEnvironmentIndex) {
|
TEST_F(DebugSymbolsTest, ContextEmbedderEnvironmentIndex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user