src: fix typos
PR-URL: https://github.com/nodejs/node/pull/55064 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
parent
fd787c96e1
commit
b5fb2ff81e
@ -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;
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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) ... {}
|
||||
*
|
||||
|
@ -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_);
|
||||
|
@ -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);
|
||||
@ -133,7 +133,7 @@ void HistogramImpl::RegisterExternalReferences(
|
||||
registry->Register(FastGetExceeds);
|
||||
registry->Register(FastGetStddev);
|
||||
registry->Register(FastGetPercentile);
|
||||
is_registerd = true;
|
||||
is_registered = true;
|
||||
}
|
||||
|
||||
HistogramBase::HistogramBase(
|
||||
|
@ -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) {
|
||||
@ -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());
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
|
@ -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};
|
||||
|
@ -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 };
|
||||
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!
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)};
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user