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

src: fix typos #55064

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/aliased_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<V8T> GetJSArray() const;

Expand Down
4 changes: 2 additions & 2 deletions src/compile_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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); });
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/cppgc_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) ... {}
*
Expand Down
2 changes: 1 addition & 1 deletion src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
Expand Down
6 changes: 3 additions & 3 deletions src/histogram.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ void HistogramImpl::AddMethods(Isolate* isolate, Local<FunctionTemplate> 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);
Expand Down Expand Up @@ -133,7 +133,7 @@ void HistogramImpl::RegisterExternalReferences(
registry->Register(FastGetExceeds);
registry->Register(FastGetStddev);
registry->Register(FastGetPercentile);
is_registerd = true;
is_registered = true;
}

HistogramBase::HistogramBase(
Expand Down
6 changes: 3 additions & 3 deletions src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Local<PrimitiveArray> 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<Value>& args) {
Expand Down Expand Up @@ -191,9 +191,9 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& 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());
Expand Down
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/node_messaging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,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());
Expand Down
2 changes: 1 addition & 1 deletion src/node_task_runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ProcessRunner::ProcessRunner(std::shared_ptr<InitializationResultImpl> 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};
Expand Down
4 changes: 2 additions & 2 deletions src/quic/endpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ void Endpoint::InitPerContext(Realm* realm, Local<Object> target) {
#undef V

#define V(name, _) IDX_STATS_ENDPOINT_##name,
enum IDX_STATS_ENDPONT { ENDPOINT_STATS(V) IDX_STATS_ENDPOINT_COUNT };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasnell is this ok? I can't find a reference to this anywhere else.

enum IDX_STATS_ENDPOINT { ENDPOINT_STATS(V) IDX_STATS_ENDPOINT_COUNT };
NODE_DEFINE_CONSTANT(target, IDX_STATS_ENDPOINT_COUNT);
#undef V

Expand Down Expand Up @@ -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!
}

Expand Down
2 changes: 1 addition & 1 deletion src/quic/endpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/quic/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Value> supported[] = {to_integer(config_.options.min_version),
to_integer(config_.options.version)};
Expand Down
2 changes: 1 addition & 1 deletion src/quic/sessionticket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/quic/streams.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/quic/tlscontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<TLSContext> context,
Expand Down
8 changes: 4 additions & 4 deletions src/tracing/trace_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<v8::ConvertableToTraceFormat> arg_convertables[2];
std::unique_ptr<v8::ConvertableToTraceFormat> arg_convertibles[2];
if (num_args > 0 && arg_types[0] == TRACE_VALUE_TYPE_CONVERTABLE) {
arg_convertables[0].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
arg_convertibles[0].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
static_cast<intptr_t>(arg_values[0])));
}
if (num_args > 1 && arg_types[1] == TRACE_VALUE_TYPE_CONVERTABLE) {
arg_convertables[1].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
arg_convertibles[1].reset(reinterpret_cast<v8::ConvertableToTraceFormat*>(
static_cast<intptr_t>(arg_values[1])));
}
// DCHECK_LE(num_args, 2);
Expand All @@ -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(
Expand Down
Loading