Skip to content

Commit

Permalink
lib,src,test: fix comments
Browse files Browse the repository at this point in the history
PR-URL: #20846
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
  • Loading branch information
tniessen authored and MylesBorins committed May 22, 2018
1 parent 24286c4 commit 1f01830
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
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 @@ -2384,7 +2384,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

0 comments on commit 1f01830

Please sign in to comment.