Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib,src,test: fix comments #20846

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ Readable.prototype.removeListener = function(ev, fn) {

if (ev === 'readable') {
// We need to check if there is someone still listening to
// to readable and reset the state. However this needs to happen
// readable and reset the state. However this needs to happen
// after readable has been emitted but before I/O (nextTick) to
// support once('readable', fn) cycles. This means that calling
// resume within the same tick will have no
Expand All @@ -850,7 +850,7 @@ Readable.prototype.removeAllListeners = function(ev) {

if (ev === 'readable' || ev === undefined) {
// We need to check if there is someone still listening to
// to readable and reset the state. However this needs to happen
// readable and reset the state. However this needs to happen
// after readable has been emitted but before I/O (nextTick) to
// support once('readable', fn) cycles. This means that calling
// resume within the same tick will have no
Expand Down
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2675,7 +2675,7 @@ static void EnvGetter(Local<Name> property,
arraysize(buffer));
// If result >= sizeof buffer the buffer was too small. That should never
// happen. If result == 0 and result != ERROR_SUCCESS the variable was not
// not found.
// found.
if ((result > 0 || GetLastError() == ERROR_SUCCESS) &&
result < arraysize(buffer)) {
const uint16_t* two_byte_buffer = reinterpret_cast<const uint16_t*>(buffer);
Expand Down
2 changes: 1 addition & 1 deletion src/stream_base-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ inline StreamResource::~StreamResource() {
StreamListener* listener = listener_;
listener->OnStreamDestroy();
// Remove the listener if it didn’t remove itself. This makes the logic
// logic in `OnStreamDestroy()` implementations easier, because they
// in `OnStreamDestroy()` implementations easier, because they
// may call generic cleanup functions which can just remove the
// listener unconditionally.
if (listener == listener_)
Expand Down
2 changes: 1 addition & 1 deletion src/tracing/node_trace_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ bool NodeTraceBuffer::Flush() {
}

// Attempts to set current_buf_ such that it references a buffer that can
// can write at least one trace event. If both buffers are unavailable this
// write at least one trace event. If both buffers are unavailable this
// method returns false; otherwise it returns true.
bool NodeTraceBuffer::TryLoadAvailableBuffer() {
InternalTraceBuffer* prev_buf = current_buf_.load();
Expand Down
2 changes: 1 addition & 1 deletion src/tracing/node_trace_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void NodeTraceWriter::WriteToFile(std::string&& str, int highest_request_id) {
write_req->str.length());
request_mutex_.Lock();
// Manage a queue of WriteRequest objects because the behavior of uv_write is
// is undefined if the same WriteRequest object is used more than once
// undefined if the same WriteRequest object is used more than once
// between WriteCb calls. In addition, this allows us to keep track of the id
// of the latest write request that actually been completed.
write_req_queue_.push(write_req);
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-timers-blocking-callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This is a regression test for
* https://github.com/nodejs/node-v0.x-archive/issues/15447 and
* and https://github.com/nodejs/node-v0.x-archive/issues/9333.
* https://github.com/nodejs/node-v0.x-archive/issues/9333.
*
* When a timer is added in another timer's callback, its underlying timer
* handle was started with a timeout that was actually incorrect.
Expand Down