Skip to content

Commit 0009485

Browse files
committed
doc,src,test: fix typos in code comments
Correct miscellaneous spelling and grammar typos in code comments and documentation. No code identifiers or runtime logic were modified. Signed-off-by: Noah Webber <noah.webber@pmg.com> Assisted-by: Gemini
1 parent 3cd2d6e commit 0009485

22 files changed

Lines changed: 31 additions & 30 deletions

‎benchmark/fixtures/coverage-many-branches.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CoveredClass {
3030
}
3131
}
3232

33-
// Excercise coverage of functions:
33+
// Exercise coverage of functions:
3434
function add(x, y) {
3535
const mt = new CoveredClass(x, y);
3636
return mt.add();

‎benchmark/misc/startup-cli-version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const path = require('path');
88
// checked into the source code. We use --version because the output
99
// tends to be minimal and fewer operations are done to generate
1010
// these so that the startup cost is still dominated by a more
11-
// indispensible part of the CLI.
11+
// indispensable part of the CLI.
1212
// NOTE: not all tools are present in tarball hence need to filter
1313
const availableCli = [
1414
'tools/eslint/node_modules/eslint/bin/eslint.js',

‎lib/internal/bootstrap/realm.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const legacyWrapperList = new SafeSet([
120120
'util',
121121
]);
122122

123-
// The code bellow assumes that the two lists must not contain any modules
123+
// The code below assumes that the two lists must not contain any modules
124124
// beginning with "internal/".
125125
// Modules that can only be imported via the node: scheme.
126126
const schemelessBlockList = new SafeSet([

‎lib/internal/main/embedding.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function embedderRunESM(content, filename) {
121121
const wrap = compileSourceTextModule(resourceName, content, kEmbedder, context);
122122

123123
// TODO(joyeecheung): we may want to return the v8::Module via a vm.SourceTextModule
124-
// when vm.SourceTextModule stablizes, or put it in an out parameter.
124+
// when vm.SourceTextModule stabilizes, or put it in an out parameter.
125125
return wrap.getNamespace();
126126
}
127127

‎lib/internal/modules/esm/translators.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function createCJSModuleWrap(url, translateContext, parentURL) {
264264
!ObjectPrototypeHasOwnProperty(exports, exportName)) {
265265
continue;
266266
}
267-
// We might trigger a getter -> dont fail.
267+
// We might trigger a getter -> don't fail.
268268
let value;
269269
try {
270270
value = exports[exportName];

‎lib/internal/quic/quic.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ async function consumeSyncSource(handle, stream, source) {
15371537
stream.destroy(err);
15381538
} else {
15391539
// If the stream is already destroyed, rethrow the error to avoid
1540-
// silently swallowing it. Tho in practice this shouldn't happen.
1540+
// silently swallowing it. Though in practice this shouldn't happen.
15411541
throw err;
15421542
}
15431543
}
@@ -4926,7 +4926,7 @@ class QuicEndpoint {
49264926
// As QuicSessions are closed they are expected to remove themselves
49274927
// from the sessions collection. Just in case they don't, let's force
49284928
// it by resetting the set so we don't leak memory. Let's emit a warning,
4929-
// tho, if the set is not empty at this point as that would indicate a
4929+
// though, if the set is not empty at this point as that would indicate a
49304930
// bug in Node.js that should be fixed.
49314931
if (inner.sessions.size > 0) {
49324932
process.emitWarning(

‎src/cppgc_helpers.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CppgcMixin : public cppgc::GarbageCollectedMixin, public MemoryRetainer {
9090
// during Realm shutdown. The destruction of the wrappers would happen later,
9191
// when the final garbage collection is triggered when CppHeap is torn down as
9292
// part of the Isolate teardown. If subclasses of CppgcMixin wish to perform
93-
// cleanups that depend on the Realm during destruction, they should implment
93+
// cleanups that depend on the Realm during destruction, they should implement
9494
// it in a Clean() override, and then call this->Finalize() from their
9595
// destructor. Outside of Finalize(), subclasses should avoid calling
9696
// into JavaScript or perform any operation that can trigger garbage

‎src/dataqueue/queue.cc‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -943,11 +943,11 @@ class FdEntry final : public EntryImpl {
943943
uv_fs_t req = uv_fs_t();
944944
auto cleanup = OnScopeLeave([&] { uv_fs_req_cleanup(&req); });
945945
// TODO(jasnell): Note the use of a sync fs call here is a bit unfortunate.
946-
// Doing this asynchronously creates a bit of a race condition tho, a file
947-
// could be unmodified when we call the operation but then by the time the
948-
// async callback is triggered to give us that answer the file is modified.
949-
// While such silliness is still possible here, the sync call at least makes
950-
// it less likely to hit the race.
946+
// Doing this asynchronously creates a bit of a race condition though, a
947+
// file could be unmodified when we call the operation but then by the time
948+
// the async callback is triggered to give us that answer the file is
949+
// modified. While such silliness is still possible here, the sync call at
950+
// least makes it less likely to hit the race.
951951
if (uv_fs_fstat(nullptr, &req, fd, nullptr) < 0) return true;
952952
return entry->is_modified(req.statbuf);
953953
}

‎src/fs_event_wrap.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename,
221221
// TODO(@jasnell): Historically, this code has failed to correctly
222222
// propagate any error returned by the StringBytes::Encode method,
223223
// and would instead just crash the process. That behavior is preserved
224-
// here but should be looked at. Preferrably errors would be handled
224+
// here but should be looked at. Preferably errors would be handled
225225
// correctly here.
226226
TryCatch try_catch(env->isolate());
227227
MaybeLocal<Value> fn =

‎src/node.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ void ResetSignalHandlers() {
516516
// The only bad handler value we can inherit from before exec is SIG_IGN
517517
// (any actual function pointer is reset to SIG_DFL during exec).
518518
// If that's the case, we want to reset it back to SIG_DFL.
519-
// However, it's also possible that an embeder (or an LD_PRELOAD-ed
519+
// However, it's also possible that an embedder (or an LD_PRELOAD-ed
520520
// library) has set up own signal handler for own purposes
521521
// (e.g. profiling). If that's the case, we want to keep it intact.
522522
struct sigaction old;

0 commit comments

Comments
 (0)