From 0f10c879574e9b9a3868c8233d3612465405b521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 25 Feb 2023 21:29:59 +0100 Subject: [PATCH] lib,src: fix a few typos in comments PR-URL: https://github.com/nodejs/node/pull/46835 Reviewed-By: Rich Trott Reviewed-By: Moshe Atlow Reviewed-By: Marco Ippolito Reviewed-By: Richard Lau Reviewed-By: Mohammed Keyvanzadeh --- lib/_http_client.js | 4 ++-- lib/_tls_wrap.js | 2 +- lib/events.js | 2 +- src/base_object.h | 2 +- src/dataqueue/queue.h | 2 +- src/node_contextify.cc | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/_http_client.js b/lib/_http_client.js index 74f7af7e2e0d9b..5fc8ccb36c018b 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -779,8 +779,8 @@ function responseOnTimeout() { res.emit('timeout'); } -// This function is necessary in the case where we receive the entire reponse -// from server before we finish sending out the request +// This function is necessary in the case where we receive the entire response +// from the server before we finish sending out the request. function requestOnFinish() { const req = this; diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index eb3642441eeefa..e8f926d4c4f7a4 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -426,7 +426,7 @@ function onerror(err) { // so self._tlsError will return null instead of actual error // Set closing the socket after emitting an event since the socket needs to - // be accessible when the `tlsClientError` event is emmited. + // be accessible when the `tlsClientError` event is emitted. owner._closeAfterHandlingError = true; owner.destroy(err); } else if (owner._tlsOptions?.isServer && diff --git a/lib/events.js b/lib/events.js index 56615c13c49cc7..89f13ac37be120 100644 --- a/lib/events.js +++ b/lib/events.js @@ -1107,7 +1107,7 @@ function on(emitter, event, options = kEmptyObject) { return highWatermark; }, /** - * It checks wether the emitter is paused by the watermark controller or not + * It checks whether the emitter is paused by the watermark controller or not */ get isPaused() { return paused; diff --git a/src/base_object.h b/src/base_object.h index 719f1d38ddf739..4ac644a034f4a6 100644 --- a/src/base_object.h +++ b/src/base_object.h @@ -250,7 +250,7 @@ inline T* Unwrap(v8::Local obj) { // reset to nullptr once the BaseObject is destroyed. // The API matches std::shared_ptr closely. However, this class is not thread // safe, that is, we can't have different BaseObjectPtrImpl instances in -// different threads refering to the same BaseObject instance. +// different threads referring to the same BaseObject instance. template class BaseObjectPtrImpl final { public: diff --git a/src/dataqueue/queue.h b/src/dataqueue/queue.h index a1a297a8fc2911..9bf34ffb6572aa 100644 --- a/src/dataqueue/queue.h +++ b/src/dataqueue/queue.h @@ -117,7 +117,7 @@ namespace node { // // For idempotent DataQueues, any number of readers can be created and // pull concurrently from the same DataQueue. The DataQueue can be read -// multiple times. Succesful reads should always produce the same result. +// multiple times. Successful reads should always produce the same result. // If, for whatever reason, the implementation cannot ensure that the // data read will remain the same, the read must fail with an error status. // diff --git a/src/node_contextify.cc b/src/node_contextify.cc index d618dafcb5f14d..5aadefd84d6af7 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -247,7 +247,7 @@ BaseObjectPtr ContextifyContext::New( const ContextOptions& options) { HandleScope scope(env->isolate()); // This only initializes part of the context. The primordials are - // only initilaized when needed because even deserializing them slows + // only initialized when needed because even deserializing them slows // things down significantly and they are only needed in rare occasions // in the vm contexts. if (InitializeContextRuntime(v8_context).IsNothing()) {