mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
benchmark,doc,lib,test: prepare for padding lint rule
Upcoming lint rule will require a blank line between consecutive functions. Add it in the places where we don't have it already. PR-URL: https://github.com/nodejs/node/pull/30696 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
2070d3f8eb
commit
359766b2c3
26 files changed
+43
No files matched your search
@@ -646,6 +646,7 @@ function needFinish(state) {
|
||||
!state.finished &&
|
||||
!state.writing);
|
||||
}
|
||||
|
||||
function callFinal(stream, state) {
|
||||
stream._final((err) => {
|
||||
state.pendingcb--;
|
||||
@@ -658,6 +659,7 @@ function callFinal(stream, state) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function prefinish(stream, state) {
|
||||
if (!state.prefinished && !state.finalCalled) {
|
||||
if (typeof stream._final === 'function' && !state.destroyed) {
|
||||
@@ -736,6 +738,7 @@ function onFinished(stream, state, cb) {
|
||||
stream.emit('error', err);
|
||||
}
|
||||
}
|
||||
|
||||
function onfinish() {
|
||||
stream.removeListener('finish', onfinish);
|
||||
stream.removeListener('error', onerror);
|
||||
|
||||
@@ -7,6 +7,7 @@ function lazyError() {
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
function assert(value, message) {
|
||||
if (!value) {
|
||||
const ERR_INTERNAL_ASSERTION = lazyError();
|
||||
|
||||
@@ -14,9 +14,13 @@ const kCurrentShutdownRequest = Symbol('kCurrentShutdownRequest');
|
||||
const kPendingShutdownRequest = Symbol('kPendingShutdownRequest');
|
||||
|
||||
function isClosing() { return this[owner_symbol].isClosing(); }
|
||||
|
||||
function onreadstart() { return this[owner_symbol].readStart(); }
|
||||
|
||||
function onreadstop() { return this[owner_symbol].readStop(); }
|
||||
|
||||
function onshutdown(req) { return this[owner_symbol].doShutdown(req); }
|
||||
|
||||
function onwrite(req, bufs) { return this[owner_symbol].doWrite(req, bufs); }
|
||||
|
||||
/* This class serves as a wrapper for when the C++ side of Node wants access
|
||||
|
||||
@@ -49,6 +49,7 @@ const kHasTickScheduled = 0;
|
||||
function hasTickScheduled() {
|
||||
return tickInfo[kHasTickScheduled] === 1;
|
||||
}
|
||||
|
||||
function setHasTickScheduled(value) {
|
||||
tickInfo[kHasTickScheduled] = value ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ function lazyWorkerStdio() {
|
||||
if (!workerStdio) workerStdio = createWorkerStdio();
|
||||
return workerStdio;
|
||||
}
|
||||
|
||||
function createStdioGetters() {
|
||||
return {
|
||||
getStdout() { return lazyWorkerStdio().stdout; },
|
||||
|
||||
@@ -273,6 +273,7 @@ function REPLServer(prompt,
|
||||
function pause() {
|
||||
paused = true;
|
||||
}
|
||||
|
||||
function unpause() {
|
||||
if (!paused) return;
|
||||
paused = false;
|
||||
|
||||
Reference in new issue
Block a user