Skip to content

Commit bc38351

Browse files
authored
Fix uses of it's vs its. (#3468)
1 parent 0c9f19d commit bc38351

26 files changed

+34
-34
lines changed

patches/v8/0016-Implement-cross-request-context-promise-resolve-hand.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ index 57db44234e2273476fe1cdcde31e1702bbabd61d..55af32087bdfa3fdee65ee3cfcc877ec
1616
+ * PromiseCrossContextResolveCallback is called when resolving or rejecting a
1717
+ * pending promise whose context tag is not strictly equal to the isolate's
1818
+ * current promise context tag. The callback is called with the promise to be
19-
+ * resolved, it's context tag, and a function that when called, causes the
19+
+ * resolved, its context tag, and a function that when called, causes the
2020
+ * reactions to the resolved promise to be enqueued. The idea is that the
2121
+ * embedder sets this callback in the case it needs to defer the actual
2222
+ * scheduling of the reactions to the given promise to a later time.

src/node/internal/internal_buffer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ float32Array[0] = -1; // 0xBF800000
5555
// check this with `os.endianness()` because that is determined at compile time.
5656
export const bigEndian = uInt8Float32Array[3] === 0;
5757

58-
// Node.js caps it's max length at uint32_t max, we are very intentionally more
58+
// Node.js caps its max length at uint32_t max, we are very intentionally more
5959
// conservative here, capping at int32_t max.
6060
export const kMaxLength = 2147483647;
6161
export const kStringMaxLength = 536870888;

src/node/internal/internal_timers_promises.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function setTimeout<T = void>(
5454
validateAbortSignal(signal, 'options.signal');
5555
}
5656

57-
// This is required due to consistency/compat reasons, even if it's no-op.
57+
// This is required due to consistency/compat reasons, even if it's a no-op.
5858
if (ref !== undefined) {
5959
validateBoolean(ref, 'options.ref');
6060
}
@@ -97,7 +97,7 @@ export async function setImmediate<T>(
9797
validateAbortSignal(signal, 'options.signal');
9898
}
9999

100-
// This is required due to consistency/compat reasons, even if it's no-op.
100+
// This is required due to consistency/compat reasons, even if it's a no-op.
101101
if (ref !== undefined) {
102102
validateBoolean(ref, 'options.ref');
103103
}

src/pyodide/internal/pool/builtin_wrappers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function monotonicDateNow(): number {
4646
*
4747
* In particular, we specifically don't want to allow calls from places that
4848
* call arbitrary functions for the user like `JsvFunction_CallBound` or
49-
* `raw_call_js`; if a user somehow gets there hands on a reference to
49+
* `raw_call_js`; if a user somehow gets their hands on a reference to
5050
* `newWasmModule` and tries to call it from Python the call would come from one
5151
* of these places. Currently we only need to allow `convertJsFunctionToWasm`
5252
* but if we enable JSPI we'll need to whitelist a few more locations.

src/pyodide/internal/topLevelEntropy/entropy_import_context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def random_context(module):
9696
# Block calls to functions that use the bad random seed we produced from the
9797
# ten getentropy() calls. Instantiating Random with a given seed is fine,
9898
# instantiating it without a seed will call getentropy() and fail.
99-
# Instantiating SystemRandom is fine, calling it's methods will call
99+
# Instantiating SystemRandom is fine, calling its methods will call
100100
# getentropy() and fail.
101101
block_calls(module, allowlist=("Random", "SystemRandom"))
102102

src/workerd/api/node/tests/util-nodejs-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3542,7 +3542,7 @@ export const utilInspectProxy = {
35423542
};
35433543
proxyObj = new Proxy(target, handler);
35443544

3545-
// Inspecting the proxy should not actually walk it's properties
3545+
// Inspecting the proxy should not actually walk its properties
35463546
util.inspect(proxyObj, opts);
35473547

35483548
// Make sure inspecting object does not trigger any proxy traps.

src/workerd/api/streams/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ data in memory without any backpressure controls.
255255
In our implementation, we have modified the `tee()` method implementation to avoid this
256256
issue.
257257

258-
Each branch maintains it's own data buffer. But instead of those buffers containing a
258+
Each branch maintains its own data buffer. But instead of those buffers containing a
259259
copy of the data, they contain a collection of refcounted references to the data. The
260260
backpressure signaling to the trunk is based on the branch wait the most unconsumed data
261261
in its buffer.

src/workerd/api/streams/common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ class WritableStreamController {
683683
// the only way to interact with the underlying sink.
684684
virtual kj::Maybe<kj::Own<WritableStreamSink>> removeSink(jsg::Lock& js) = 0;
685685

686-
// Detaches the WritableStreamController from it's underlying implementation, leaving the
686+
// Detaches the WritableStreamController from its underlying implementation, leaving the
687687
// writable stream locked and in a state where no further writes can be made.
688688
virtual void detach(jsg::Lock& js) = 0;
689689

src/workerd/api/streams/internal.c++

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class AllReader final {
143143
uint64_t amountToRead =
144144
kj::min(limit, kj::min(MAX_BUFFER_CHUNK, maybeLength.orDefault(DEFAULT_BUFFER_CHUNK)));
145145
// amountToRead can be zero if the stream reported a zero-length. While the stream could
146-
// be lying about it's length, let's skip reading anything in this case.
146+
// be lying about its length, let's skip reading anything in this case.
147147
if (amountToRead > 0) {
148148
for (;;) {
149149
auto bytes = kj::heapArray<T>(amountToRead);

src/workerd/api/streams/queue.c++

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ bool ByteQueue::ByobRequest::respond(jsg::Lock& js, size_t amount) {
498498

499499
bool ByteQueue::ByobRequest::respondWithNewView(jsg::Lock& js, jsg::BufferSource view) {
500500
// The idea here is that rather than filling the view that the controller was given,
501-
// it chose to create it's own view and fill that, likely over the same ArrayBuffer.
501+
// it chose to create its own view and fill that, likely over the same ArrayBuffer.
502502
// What we do here is perform some basic validations on what we were given, and if
503503
// those pass, we'll replace the backing store held in the req.pullInto with the one
504504
// given, then continue on issuing the respond as normal.

src/workerd/api/streams/readable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ class ReadableStream: public jsg::Object {
360360
});
361361
}
362362

363-
// Detaches this ReadableStream from it's underlying controller state, returning a
363+
// Detaches this ReadableStream from its underlying controller state, returning a
364364
// new ReadableStream instance that takes over the underlying state. This is used to
365365
// support the "create a proxy" of a ReadableStream algorithm in the streams spec
366366
// (see https://streams.spec.whatwg.org/#readablestream-create-a-proxy). In that

src/workerd/api/streams/standard.c++

+2-2
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ jsg::Promise<void> ReadableImpl<Self>::cancel(
932932
if (consumerCount > 1) {
933933
// If there is more than 1 consumer, then we just return here with an
934934
// immediately resolved promise. The consumer will remove itself,
935-
// canceling it's interest in the underlying source but we do not yet
935+
// canceling its interest in the underlying source but we do not yet
936936
// want to cancel the underlying source since there are still other
937937
// consumers that want data.
938938
return js.resolvedPromise();
@@ -3140,7 +3140,7 @@ kj::Promise<DeferredProxy<void>> ReadableStreamJsController::pumpTo(
31403140
disturbed = true;
31413141

31423142
// This operation will leave the ReadableStream locked and disturbed. It will consume
3143-
// the stream until it either closed or errors. If the deferred proxy promise or it's
3143+
// the stream until it either closed or errors. If the deferred proxy promise or its
31443144
// inner promise is dropped, the PumpToReader (and sink) will be dropped and the stream
31453145
// will be canceled. If the PumpToReader is dropped while there is a pending write on
31463146
// the sink, the pending write will be canceled.

src/workerd/api/streams/standard.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class WritableImpl {
354354
struct Writable {};
355355

356356
// Sadly, we have to use a weak ref here rather than jsg::Ref. This is because
357-
// the jsg::Ref<WritableStream> (via it's internal WritableStreamJsController)
357+
// the jsg::Ref<WritableStream> (via its internal WritableStreamJsController)
358358
// holds a strong reference to the jsg::Ref<WritableStreamDefaultController> that
359359
// uses this WritableImpl. This creates a strong circular reference between jsg::Refs
360360
// that isn't allowed. GcTracing ends up with a stack overflow as the two jsg::Refs

src/workerd/api/tests/url-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ export const urlSearchParamsInit2 = {
369369

370370
export const urlSearchParamsInit3 = {
371371
test() {
372-
// If the initializer has a deleted iterator, then it's
372+
// If the initializer has a deleted iterator, then its
373373
// contents are ignored but can still be interpreted as
374374
// a dictionary.
375375
const search1 = new URLSearchParams('a=b');

src/workerd/api/url-standard.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace workerd::api {
1515
// The original URL implementation based on kj::Url is not compliant with the
1616
// WHATWG URL standard, but we can't get rid of it. This is an alternate
1717
// implementation that is based on the spec. It can be enabled using a
18-
// configuration flag. We put it in it's own namespace to keep it's classes
18+
// configuration flag. We put it in its own namespace to keep its classes
1919
// from conflicting with the old implementation.
2020
namespace url {
2121

src/workerd/api/worker-rpc.c++

+4-4
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ rpc::JsRpcTarget::Client JsRpcProperty::getClientForOneCall(
432432

433433
namespace {
434434

435-
struct JsRpcPromiseAndPipleine {
435+
struct JsRpcPromiseAndPipeline {
436436
jsg::JsPromise promise;
437437
kj::Own<JsRpcPromise::WeakRef> weakRef;
438438
rpc::JsRpcTarget::CallResults::Pipeline pipeline;
@@ -444,7 +444,7 @@ struct JsRpcPromiseAndPipleine {
444444
};
445445

446446
// Core implementation of making an RPC call, reusable for many cases below.
447-
JsRpcPromiseAndPipleine callImpl(jsg::Lock& js,
447+
JsRpcPromiseAndPipeline callImpl(jsg::Lock& js,
448448
JsRpcClientProvider& parent,
449449
kj::Maybe<const kj::String&> name,
450450
// If `maybeArgs` is provided, this is a call, otherwise it is a property access.
@@ -467,7 +467,7 @@ JsRpcPromiseAndPipleine callImpl(jsg::Lock& js,
467467
// less convenient.
468468

469469
try {
470-
return js.tryCatch([&]() -> JsRpcPromiseAndPipleine {
470+
return js.tryCatch([&]() -> JsRpcPromiseAndPipeline {
471471
// `path` will be filled in with the path of property names leading from the stub represented by
472472
// `client` to the specific property / method that we're trying to invoke.
473473
kj::Vector<kj::StringPtr> path;
@@ -578,7 +578,7 @@ JsRpcPromiseAndPipleine callImpl(jsg::Lock& js,
578578
.weakRef = kj::mv(weakRef),
579579
.pipeline = kj::mv(callResult),
580580
};
581-
}, [&](jsg::Value error) -> JsRpcPromiseAndPipleine {
581+
}, [&](jsg::Value error) -> JsRpcPromiseAndPipeline {
582582
// Probably a serialization error. Need to convert to an async error since we never throw
583583
// synchronously from async functions.
584584
auto jsError = jsg::JsValue(error.getHandle(js));

src/workerd/api/worker-rpc.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace workerd::api {
3030
// separate calls.
3131
constexpr size_t MAX_JS_RPC_MESSAGE_SIZE = 1u << 20;
3232

33-
// ExternalHandler used when serializing RPC messages. Serialization functions which whish to
33+
// ExternalHandler used when serializing RPC messages. Serialization functions with which to
3434
// handle RPC specially should use this.
3535
class RpcSerializerExternalHander final: public jsg::Serializer::ExternalHandler {
3636
public:
@@ -81,7 +81,7 @@ class RpcSerializerExternalHander final: public jsg::Serializer::ExternalHandler
8181
class RpcStubDisposalGroup;
8282
class StreamSinkImpl;
8383

84-
// ExternalHandler used when deserializing RPC messages. Deserialization functions which whish to
84+
// ExternalHandler used when deserializing RPC messages. Deserialization functions with which to
8585
// handle RPC specially should use this.
8686
class RpcDeserializerExternalHander final: public jsg::Deserializer::ExternalHandler {
8787
public:
@@ -144,7 +144,7 @@ class JsRpcTarget: public jsg::Object {
144144
// Common superclass of JsRpcStub and Fetcher, the two types that may serve as the basis for
145145
// RPC calls.
146146
//
147-
// This class is NOT part of the JavaScript class heirarchy (it has no JSG_RESOURCE_TYPE block),
147+
// This class is NOT part of the JavaScript class hierarchy (it has no JSG_RESOURCE_TYPE block),
148148
// it's only a C++ class used to abstract how to get a capnp client out of the object.
149149
class JsRpcClientProvider: public jsg::Object {
150150
public:

src/workerd/io/compatibility-date.capnp

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef {
156156
$compatEnableDate("2022-01-31")
157157
$compatDisableFlag("workers_api_getters_setters_on_instance");
158158
# Originally, JSG_PROPERTY registered getter/setters on an objects *instance*
159-
# template as opposed to it's prototype template. This broke subclassing at
159+
# template as opposed to its prototype template. This broke subclassing at
160160
# the JavaScript layer, preventing a subclass from correctly overriding the
161161
# superclasses getters/setters. This flag controls the breaking change made
162162
# to set those getters/setters on the prototype template instead.

src/workerd/io/io-own.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class DeleteQueue: public kj::AtomicRefcounted {
166166
friend class IoContext;
167167
};
168168

169-
// Object which can push actions into a specific DeleteQueue then signal it's
169+
// Object which can push actions into a specific DeleteQueue then signal its
170170
// owning IoContext to wake up to process the queue. This is a bit of a hack of
171171
// the DeleteQueue concept that allows us to use the same queue for more than
172172
// just deletions.

src/workerd/io/worker.c++

+2-2
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ Worker::Isolate::Isolate(kj::Own<Api> apiParam,
11401140
// The PromiseCrossContextResolveCallback is used to ensure that promise reactions
11411141
// are only scheduled on the microtask queue from the appropriate IoContext for the
11421142
// promise. Huh? Yeah, that's not super clear... let me explain a bit more.
1143-
// Every request runs in it's own IoContext.
1143+
// Every request runs in its own IoContext.
11441144
// Some I/O objects are bound to the IoContext when they are created.
11451145
// If these objects are accessed from the wrong IoContext, things blow up.
11461146
// If I create a promise in one request and pass the resolve/reject functions
@@ -2208,7 +2208,7 @@ void Worker::Lock::validateHandlers(ValidationErrorReporter& errorReporter) {
22082208
}
22092209
for (auto& entry: worker.impl->statelessClasses) {
22102210
// We want to report all of the stateless class's members. To do this, we examine its
2211-
// prototype, and it's prototype's prototype, and so on, until we get to Object's
2211+
// prototype, and its prototype's prototype, and so on, until we get to Object's
22122212
// prototype, which we ignore.
22132213
auto entrypointName = getEntrypointName(entry.key);
22142214
js.withinHandleScope([&]() {

src/workerd/jsg/jsg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ using HasGetTemplateOverload =
521521
static constexpr decltype(jsgSerializeTag) jsgSerializeOldTags[] = {}; \
522522
static constexpr auto jsgSerializeOneway = true
523523

524-
// Declares a wildcart property getter. If a property is requested that isn't already present on
524+
// Declares a wildcard property getter. If a property is requested that isn't already present on
525525
// the object or its prototypes, the wildcard property getter will be given a chance to return the
526526
// property.
527527
//

src/workerd/jsg/modules-new.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ struct ResolveContext final {
160160
// The abstraction of a module within the ModuleRegistry.
161161
// Importantly, a Module is immutable once created and must be thread-safe.
162162
// The Module class itself represents the definition of a module and not
163-
// it's actual instantiation.
163+
// its actual instantiation.
164164
class Module {
165165
public:
166166
enum class Type : uint8_t {

src/workerd/jsg/observer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct ResolveObserver {
2929
// The resolve is being performed in the context of a builtin module
3030
// (that is, one of the modules built into the worker runtime).
3131
BUILTIN,
32-
// Like builtin, the but it's a module that is *only* resolvable from a builtin
32+
// Like builtin, but it's a module that is *only* resolvable from a builtin
3333
// (like the `node-internal:...` modules)
3434
BUILTIN_ONLY,
3535
};

src/workerd/jsg/util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ v8::Local<v8::Value> deepClone(v8::Local<v8::Context> context, v8::Local<v8::Val
213213
//
214214
// TODO(cleanup): Call sites should migrate to the new js.str(...) variants on jsg::Lock
215215
// rather than calling v8Str directly. Once the migration is a big further along, v8Str
216-
// and it's variants will be explicitly marked deprecated.
216+
// and its variants will be explicitly marked deprecated.
217217
template <typename T>
218218
v8::Local<v8::String> v8Str(v8::Isolate* isolate,
219219
kj::ArrayPtr<T> ptr,

src/workerd/server/server.c++

+1-1
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ kj::Own<Server::Service> Server::makeDiskDirectoryService(kj::StringPtr name,
12281228
// =======================================================================================
12291229

12301230
// This class exists to update the InspectorService's table of isolates when a config
1231-
// has multiple services. The InspectorService exists on the stack of it's own thread and
1231+
// has multiple services. The InspectorService exists on the stack of its own thread and
12321232
// initializes state that is bound to the thread, e.g. a http server and an event loop.
12331233
// This class provides a small thread-safe interface to the InspectorService so <name>:<isolate>
12341234
// mappings can be added after the InspectorService has started.

src/workerd/util/sqlite-kv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SqliteKv: private SqliteDatabase::ResetListener {
3939

4040
enum Order { FORWARD, REVERSE };
4141

42-
// Search for all knows keys and values in a range, calling the callback (with KeyPtr and
42+
// Search for all known keys and values in a range, calling the callback (with KeyPtr and
4343
// ValuePtr parameters) for each one seen. `end` and `limit` can be null to request no constraint
4444
// be enforced.
4545
template <typename Func>

0 commit comments

Comments
 (0)