Skip to content

Commit 73e199d

Browse files
bl-uerichardlau
authored andcommitted
src: fix typos
PR-URL: #38845 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
1 parent e36d2a6 commit 73e199d

8 files changed

+11
-11
lines changed

src/base_object.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class BaseObject : public MemoryRetainer {
189189
// Indicates whether MakeWeak() has been called.
190190
bool wants_weak_jsobj = false;
191191
// Indicates whether Detach() has been called. If that is the case, this
192-
// object will be destryoed once the strong pointer count drops to zero.
192+
// object will be destroyed once the strong pointer count drops to zero.
193193
bool is_detached = false;
194194
// Reference to the original BaseObject. This is used by weak pointers.
195195
BaseObject* self = nullptr;

src/cares_wrap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ void SetLocalAddress(const FunctionCallbackInfo<Value>& args) {
18091809
return;
18101810
}
18111811
} else {
1812-
// No second arg specifed
1812+
// No second arg specified
18131813
if (type0 == 4) {
18141814
memset(&addr1, 0, sizeof(addr1));
18151815
ares_set_local_ip6(channel->cares_channel(), addr1);

src/debug_utils.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream) {
355355
void* first_field = nullptr;
356356
// `handle->data` might be any value, including `nullptr`, or something
357357
// cast from a completely different type; therefore, check that it’s
358-
// dereferencable first.
358+
// dereferenceable first.
359359
if (sym_ctx->IsMapped(handle->data))
360360
first_field = *reinterpret_cast<void**>(handle->data);
361361

src/js_native_api_v8.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class RefBase : protected Finalizer, RefTracker {
248248
delete reference;
249249
} else {
250250
// defer until finalizer runs as
251-
// it may alread be queued
251+
// it may already be queued
252252
reference->_delete_self = true;
253253
}
254254
}
@@ -416,7 +416,7 @@ class Reference : public RefBase {
416416
inline void SetWeak() {
417417
if (_secondPassParameter == nullptr) {
418418
// This means that the Reference has already been processed
419-
// by the second pass calback, so its already been Finalized, do
419+
// by the second pass callback, so its already been Finalized, do
420420
// nothing
421421
return;
422422
}
@@ -455,9 +455,9 @@ class Reference : public RefBase {
455455
// second pass callback task. We have to make sure that parameter is kept
456456
// alive until the second pass callback is been invoked. In order to do
457457
// this and still allow our code to Finalize/delete the Reference during
458-
// shutdown we have to use a seperately allocated parameter instead
458+
// shutdown we have to use a separately allocated parameter instead
459459
// of a parameter within the Reference object itself. This is what
460-
// is stored in _secondPassParameter and it is alocated in the
460+
// is stored in _secondPassParameter and it is allocated in the
461461
// constructor for the Reference.
462462
static void SecondPassCallback(
463463
const v8::WeakCallbackInfo<SecondPassCallParameterRef>& data) {

src/node_http2.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3101,7 +3101,7 @@ void Initialize(Local<Object> target,
31013101

31023102
Local<Object> constants = Object::New(isolate);
31033103

3104-
// This does alocate one more slot than needed but it's not used.
3104+
// This does allocate one more slot than needed but it's not used.
31053105
#define V(name) FIXED_ONE_BYTE_STRING(isolate, #name),
31063106
Local<Value> error_code_names[] = {
31073107
HTTP2_ERROR_CODES(V)

src/node_i18n.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ void ConverterObject::Decode(const FunctionCallbackInfo<Value>& args) {
484484
}
485485
ret = ToBufferEndian(env, &result);
486486
if (omit_initial_bom && !ret.IsEmpty()) {
487-
// Peform `ret = ret.slice(2)`.
487+
// Perform `ret = ret.slice(2)`.
488488
CHECK(ret.ToLocalChecked()->IsUint8Array());
489489
Local<Uint8Array> orig_ret = ret.ToLocalChecked().As<Uint8Array>();
490490
ret = Buffer::New(env,

src/node_messaging.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ void MessagePort::OnMessage() {
736736
// interruption that were already present when the OnMessage() call was
737737
// first triggered, but at least 1000 messages because otherwise the
738738
// overhead of repeatedly triggering the uv_async_t instance becomes
739-
// noticable, at least on Windows.
739+
// noticeable, at least on Windows.
740740
// (That might require more investigation by somebody more familiar with
741741
// Windows.)
742742
TriggerAsync();

src/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ class MaybeStackBuffer {
406406
buf_[length] = T();
407407
}
408408

409-
// Make derefencing this object return nullptr.
409+
// Make dereferencing this object return nullptr.
410410
// This method can be called multiple times throughout the lifetime of the
411411
// buffer, but once this has been called AllocateSufficientStorage() cannot
412412
// be used.

0 commit comments

Comments
 (0)