From b5fb2ff81e20d239ca0e4e4c8bd8d25d0cc33e4e Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Sat, 28 Sep 2024 01:34:48 +1000 Subject: [PATCH] src: fix typos PR-URL: https://github.com/nodejs/node/pull/55064 Reviewed-By: Filip Skokan Reviewed-By: Luigi Pinca Reviewed-By: Matteo Collina --- src/aliased_buffer.h | 2 +- src/compile_cache.cc | 4 ++-- src/cppgc_helpers.h | 2 +- src/env.cc | 2 +- src/histogram.cc | 6 +++--- src/module_wrap.cc | 6 +++--- src/node.cc | 2 +- src/node_messaging.cc | 2 +- src/node_task_runner.cc | 2 +- src/quic/endpoint.cc | 4 ++-- src/quic/endpoint.h | 2 +- src/quic/session.cc | 2 +- src/quic/sessionticket.h | 2 +- src/quic/streams.h | 2 +- src/quic/tlscontext.h | 2 +- src/tracing/trace_event.h | 8 ++++---- 16 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/aliased_buffer.h b/src/aliased_buffer.h index b847641f8faa15..8c93ef4b317ab0 100644 --- a/src/aliased_buffer.h +++ b/src/aliased_buffer.h @@ -111,7 +111,7 @@ class AliasedBufferBase : public MemoryRetainer { }; /** - * Get the underlying v8 TypedArray overlayed on top of the native buffer + * Get the underlying v8 TypedArray overlaid on top of the native buffer */ v8::Local GetJSArray() const; diff --git a/src/compile_cache.cc b/src/compile_cache.cc index 1c5d64e434d11d..f791f28e4558de 100644 --- a/src/compile_cache.cc +++ b/src/compile_cache.cc @@ -358,7 +358,7 @@ void CompileCacheHandler::Persist() { // 2. v23.0.0-pre-arm64-5fad6d45-501 is the sub cache directory and // e7f8ef7f is the hash for the cache (see // CompileCacheHandler::Enable()), - // 3. tcqrsK is generated by uv_fs_mkstemp() as a temporary indentifier. + // 3. tcqrsK is generated by uv_fs_mkstemp() as a temporary identifier. uv_fs_t mkstemp_req; auto cleanup_mkstemp = OnScopeLeave([&mkstemp_req]() { uv_fs_req_cleanup(&mkstemp_req); }); @@ -444,7 +444,7 @@ CompileCacheHandler::CompileCacheHandler(Environment* env) // Directory structure: // - Compile cache directory (from NODE_COMPILE_CACHE) -// - $NODE_VERION-$ARCH-$CACHE_DATA_VERSION_TAG-$UID +// - $NODE_VERSION-$ARCH-$CACHE_DATA_VERSION_TAG-$UID // - $FILENAME_AND_MODULE_TYPE_HASH.cache: a hash of filename + module type CompileCacheEnableResult CompileCacheHandler::Enable(Environment* env, const std::string& dir) { diff --git a/src/cppgc_helpers.h b/src/cppgc_helpers.h index 177ba95a023069..20b9004917cfbe 100644 --- a/src/cppgc_helpers.h +++ b/src/cppgc_helpers.h @@ -121,7 +121,7 @@ class CppgcMixin : public cppgc::GarbageCollectedMixin { /** * Helper macro the manage the cppgc-based wrapper hierarchy. This must - * be used at the left-most postion - right after `:` in the class inheritance, + * be used at the left-most position - right after `:` in the class inheritance, * like this: * class Klass : CPPGC_MIXIN(Klass) ... {} * diff --git a/src/env.cc b/src/env.cc index 57da01db8f385d..196cffbea4e034 100644 --- a/src/env.cc +++ b/src/env.cc @@ -2167,7 +2167,7 @@ inline size_t Environment::SelfSize() const { } void Environment::MemoryInfo(MemoryTracker* tracker) const { - // Iteratable STLs have their own sizes subtracted from the parent + // Iterable STLs have their own sizes subtracted from the parent // by default. tracker->TrackField("isolate_data", isolate_data_); tracker->TrackField("destroy_async_id_list", destroy_async_id_list_); diff --git a/src/histogram.cc b/src/histogram.cc index 20d93c77613b77..f93981cb89d33a 100644 --- a/src/histogram.cc +++ b/src/histogram.cc @@ -100,8 +100,8 @@ void HistogramImpl::AddMethods(Isolate* isolate, Local tmpl) { void HistogramImpl::RegisterExternalReferences( ExternalReferenceRegistry* registry) { - static bool is_registerd = false; - if (is_registerd) return; + static bool is_registered = false; + if (is_registered) return; registry->Register(GetCount); registry->Register(GetCountBigInt); registry->Register(GetExceeds); @@ -133,7 +133,7 @@ void HistogramImpl::RegisterExternalReferences( registry->Register(FastGetExceeds); registry->Register(FastGetStddev); registry->Register(FastGetPercentile); - is_registerd = true; + is_registered = true; } HistogramBase::HistogramBase( diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 48b61e8b760070..e2252639cf4518 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -151,7 +151,7 @@ Local ModuleWrap::GetHostDefinedOptions( } // new ModuleWrap(url, context, source, lineOffset, columnOffset[, cachedData]); -// new ModuleWrap(url, context, source, lineOffset, columOffset, +// new ModuleWrap(url, context, source, lineOffset, columnOffset, // idSymbol); // new ModuleWrap(url, context, exportNames, evaluationCallback[, cjsModule]) void ModuleWrap::New(const FunctionCallbackInfo& args) { @@ -191,9 +191,9 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { // cjsModule]) CHECK(args[3]->IsFunction()); } else { - // new ModuleWrap(url, context, source, lineOffset, columOffset[, + // new ModuleWrap(url, context, source, lineOffset, columnOffset[, // cachedData]); - // new ModuleWrap(url, context, source, lineOffset, columOffset, + // new ModuleWrap(url, context, source, lineOffset, columnOffset, // idSymbol); CHECK(args[2]->IsString()); CHECK(args[3]->IsNumber()); diff --git a/src/node.cc b/src/node.cc index cc8cc8cf86401d..26f94be94bae70 100644 --- a/src/node.cc +++ b/src/node.cc @@ -494,7 +494,7 @@ void ResetSignalHandlers() { continue; act.sa_handler = (nr == SIGPIPE || nr == SIGXFSZ) ? SIG_IGN : SIG_DFL; if (act.sa_handler == SIG_DFL) { - // The only bad handler value we can inhert from before exec is SIG_IGN + // The only bad handler value we can inherit from before exec is SIG_IGN // (any actual function pointer is reset to SIG_DFL during exec). // If that's the case, we want to reset it back to SIG_DFL. // However, it's also possible that an embeder (or an LD_PRELOAD-ed diff --git a/src/node_messaging.cc b/src/node_messaging.cc index b86b4b6d6aed44..9d9e27c3624e6b 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -803,7 +803,7 @@ void MessagePort::OnMessage(MessageProcessingMode mode) { // The data_ could be freed or, the handle has been/is being closed. // A possible case for this, is transfer the MessagePort to another // context, it will call the constructor and trigger the async handle empty. - // Because all data was sent from the preivous context. + // Because all data was sent from the previous context. if (IsDetached()) return; HandleScope handle_scope(env()->isolate()); diff --git a/src/node_task_runner.cc b/src/node_task_runner.cc index 359212d3ef5b36..efaf6f01b3fbf9 100644 --- a/src/node_task_runner.cc +++ b/src/node_task_runner.cc @@ -69,7 +69,7 @@ ProcessRunner::ProcessRunner(std::shared_ptr result, command_args_ = { options_.file, "/d", "/s", "/c", "\"" + command_str + "\""}; } else { - // If the file is not cmd.exe, and it is unclear wich shell is being used, + // If the file is not cmd.exe, and it is unclear which shell is being used, // so assume -c is the correct syntax (Unix-like shells use -c for this // purpose). command_args_ = {options_.file, "-c", command_str}; diff --git a/src/quic/endpoint.cc b/src/quic/endpoint.cc index 4c89ecdd91803e..8fb6900b9cfe6f 100644 --- a/src/quic/endpoint.cc +++ b/src/quic/endpoint.cc @@ -624,7 +624,7 @@ void Endpoint::InitPerContext(Realm* realm, Local target) { #undef V #define V(name, _) IDX_STATS_ENDPOINT_##name, - enum IDX_STATS_ENDPONT { ENDPOINT_STATS(V) IDX_STATS_ENDPOINT_COUNT }; + enum IDX_STATS_ENDPOINT { ENDPOINT_STATS(V) IDX_STATS_ENDPOINT_COUNT }; NODE_DEFINE_CONSTANT(target, IDX_STATS_ENDPOINT_COUNT); #undef V @@ -1521,7 +1521,7 @@ void Endpoint::Receive(const uv_buf_t& buf, // packet with a non-standard CID length. if (UNLIKELY(pversion_cid.dcidlen > NGTCP2_MAX_CIDLEN || pversion_cid.scidlen > NGTCP2_MAX_CIDLEN)) { - Debug(this, "Packet had incorrectly sized CIDs, igoring"); + Debug(this, "Packet had incorrectly sized CIDs, ignoring"); return; // Ignore the packet! } diff --git a/src/quic/endpoint.h b/src/quic/endpoint.h index f04131185e29a7..132ebae18d494d 100644 --- a/src/quic/endpoint.h +++ b/src/quic/endpoint.h @@ -92,7 +92,7 @@ class Endpoint final : public AsyncWrap, public Packet::Listener { // Similar to stateless resets, we enforce a limit on the number of retry // packets that can be generated and sent for a remote host. Generating // retry packets consumes a modest amount of resources and it's fairly - // trivial for a malcious peer to trigger generation of a large number of + // trivial for a malicious peer to trigger generation of a large number of // retries, so limiting them helps prevent a DOS vector. uint64_t max_retries = DEFAULT_MAX_RETRY_LIMIT; diff --git a/src/quic/session.cc b/src/quic/session.cc index ec54a67588d9b2..e3cc27b2c66286 100644 --- a/src/quic/session.cc +++ b/src/quic/session.cc @@ -1709,7 +1709,7 @@ void Session::EmitVersionNegotiation(const ngtcp2_pkt_hd& hd, versions.AllocateSufficientStorage(nsv); for (size_t n = 0; n < nsv; n++) versions[n] = to_integer(sv[n]); - // supported are the versons we acutually support expressed as a range. + // supported are the versions we acutually support expressed as a range. // The first value is the minimum version, the second is the maximum. Local supported[] = {to_integer(config_.options.min_version), to_integer(config_.options.version)}; diff --git a/src/quic/sessionticket.h b/src/quic/sessionticket.h index 5776459d550d13..d7ec639baeff74 100644 --- a/src/quic/sessionticket.h +++ b/src/quic/sessionticket.h @@ -61,7 +61,7 @@ class SessionTicket final : public MemoryRetainer { // SessionTicket::AppData is a utility class that is used only during the // generation or access of TLS stateless sesson tickets. It exists solely to // provide a easier way for Session::Application instances to set relevant -// metadata in the session ticket when it is created, and the exract and +// metadata in the session ticket when it is created, and the extract and // subsequently verify that data when a ticket is received and is being // validated. The app data is completely opaque to anything other than the // server-side of the Session::Application that sets it. diff --git a/src/quic/streams.h b/src/quic/streams.h index 1bab5b245fcc50..15f86cda0e3c86 100644 --- a/src/quic/streams.h +++ b/src/quic/streams.h @@ -155,7 +155,7 @@ class Stream : public AsyncWrap, void BeginHeaders(HeadersKind kind); // Returns false if the header cannot be added. This will typically happen - // if the application does not support headers, a maximimum number of headers + // if the application does not support headers, a maximum number of headers // have already been added, or the maximum total header length is reached. bool AddHeader(const Header& header); void set_headers_kind(HeadersKind kind); diff --git a/src/quic/tlscontext.h b/src/quic/tlscontext.h index 3ffbd7770443dd..c7ee7f8ef72dc4 100644 --- a/src/quic/tlscontext.h +++ b/src/quic/tlscontext.h @@ -29,7 +29,7 @@ class TLSSession final : public MemoryRetainer { public: static const TLSSession& From(const SSL* ssl); - // The constructor is public in order to satisify the call to std::make_unique + // The constructor is public in order to satisfy the call to std::make_unique // in TLSContext::NewSession. It should not be called directly. TLSSession(Session* session, std::shared_ptr context, diff --git a/src/tracing/trace_event.h b/src/tracing/trace_event.h index be0f55a409a71b..fc04cd5d19194c 100644 --- a/src/tracing/trace_event.h +++ b/src/tracing/trace_event.h @@ -483,13 +483,13 @@ static V8_INLINE uint64_t AddTraceEventWithTimestampImpl( const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names, const uint8_t* arg_types, const uint64_t* arg_values, unsigned int flags, int64_t timestamp) { - std::unique_ptr arg_convertables[2]; + std::unique_ptr arg_convertibles[2]; if (num_args > 0 && arg_types[0] == TRACE_VALUE_TYPE_CONVERTABLE) { - arg_convertables[0].reset(reinterpret_cast( + arg_convertibles[0].reset(reinterpret_cast( static_cast(arg_values[0]))); } if (num_args > 1 && arg_types[1] == TRACE_VALUE_TYPE_CONVERTABLE) { - arg_convertables[1].reset(reinterpret_cast( + arg_convertibles[1].reset(reinterpret_cast( static_cast(arg_values[1]))); } // DCHECK_LE(num_args, 2); @@ -498,7 +498,7 @@ static V8_INLINE uint64_t AddTraceEventWithTimestampImpl( if (controller == nullptr) return 0; return controller->AddTraceEventWithTimestamp( phase, category_group_enabled, name, scope, id, bind_id, num_args, - arg_names, arg_types, arg_values, arg_convertables, flags, timestamp); + arg_names, arg_types, arg_values, arg_convertibles, flags, timestamp); } static V8_INLINE void AddMetadataEventImpl(