Skip to content

Commit

Permalink
Fix uses of it's vs its. (#3468)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikcorry authored Feb 7, 2025
1 parent 0c9f19d commit bc38351
Show file tree
Hide file tree
Showing 26 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ index 57db44234e2273476fe1cdcde31e1702bbabd61d..55af32087bdfa3fdee65ee3cfcc877ec
+ * PromiseCrossContextResolveCallback is called when resolving or rejecting a
+ * pending promise whose context tag is not strictly equal to the isolate's
+ * current promise context tag. The callback is called with the promise to be
+ * resolved, it's context tag, and a function that when called, causes the
+ * resolved, its context tag, and a function that when called, causes the
+ * reactions to the resolved promise to be enqueued. The idea is that the
+ * embedder sets this callback in the case it needs to defer the actual
+ * scheduling of the reactions to the given promise to a later time.
Expand Down
2 changes: 1 addition & 1 deletion src/node/internal/internal_buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ float32Array[0] = -1; // 0xBF800000
// check this with `os.endianness()` because that is determined at compile time.
export const bigEndian = uInt8Float32Array[3] === 0;

// Node.js caps it's max length at uint32_t max, we are very intentionally more
// Node.js caps its max length at uint32_t max, we are very intentionally more
// conservative here, capping at int32_t max.
export const kMaxLength = 2147483647;
export const kStringMaxLength = 536870888;
Expand Down
4 changes: 2 additions & 2 deletions src/node/internal/internal_timers_promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function setTimeout<T = void>(
validateAbortSignal(signal, 'options.signal');
}

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

// This is required due to consistency/compat reasons, even if it's no-op.
// This is required due to consistency/compat reasons, even if it's a no-op.
if (ref !== undefined) {
validateBoolean(ref, 'options.ref');
}
Expand Down
2 changes: 1 addition & 1 deletion src/pyodide/internal/pool/builtin_wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function monotonicDateNow(): number {
*
* In particular, we specifically don't want to allow calls from places that
* call arbitrary functions for the user like `JsvFunction_CallBound` or
* `raw_call_js`; if a user somehow gets there hands on a reference to
* `raw_call_js`; if a user somehow gets their hands on a reference to
* `newWasmModule` and tries to call it from Python the call would come from one
* of these places. Currently we only need to allow `convertJsFunctionToWasm`
* but if we enable JSPI we'll need to whitelist a few more locations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def random_context(module):
# Block calls to functions that use the bad random seed we produced from the
# ten getentropy() calls. Instantiating Random with a given seed is fine,
# instantiating it without a seed will call getentropy() and fail.
# Instantiating SystemRandom is fine, calling it's methods will call
# Instantiating SystemRandom is fine, calling its methods will call
# getentropy() and fail.
block_calls(module, allowlist=("Random", "SystemRandom"))

Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/node/tests/util-nodejs-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3542,7 +3542,7 @@ export const utilInspectProxy = {
};
proxyObj = new Proxy(target, handler);

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

// Make sure inspecting object does not trigger any proxy traps.
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/streams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ data in memory without any backpressure controls.
In our implementation, we have modified the `tee()` method implementation to avoid this
issue.

Each branch maintains it's own data buffer. But instead of those buffers containing a
Each branch maintains its own data buffer. But instead of those buffers containing a
copy of the data, they contain a collection of refcounted references to the data. The
backpressure signaling to the trunk is based on the branch wait the most unconsumed data
in its buffer.
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/streams/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ class WritableStreamController {
// the only way to interact with the underlying sink.
virtual kj::Maybe<kj::Own<WritableStreamSink>> removeSink(jsg::Lock& js) = 0;

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

Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/streams/internal.c++
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class AllReader final {
uint64_t amountToRead =
kj::min(limit, kj::min(MAX_BUFFER_CHUNK, maybeLength.orDefault(DEFAULT_BUFFER_CHUNK)));
// amountToRead can be zero if the stream reported a zero-length. While the stream could
// be lying about it's length, let's skip reading anything in this case.
// be lying about its length, let's skip reading anything in this case.
if (amountToRead > 0) {
for (;;) {
auto bytes = kj::heapArray<T>(amountToRead);
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/streams/queue.c++
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ bool ByteQueue::ByobRequest::respond(jsg::Lock& js, size_t amount) {

bool ByteQueue::ByobRequest::respondWithNewView(jsg::Lock& js, jsg::BufferSource view) {
// The idea here is that rather than filling the view that the controller was given,
// it chose to create it's own view and fill that, likely over the same ArrayBuffer.
// it chose to create its own view and fill that, likely over the same ArrayBuffer.
// What we do here is perform some basic validations on what we were given, and if
// those pass, we'll replace the backing store held in the req.pullInto with the one
// given, then continue on issuing the respond as normal.
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/streams/readable.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class ReadableStream: public jsg::Object {
});
}

// Detaches this ReadableStream from it's underlying controller state, returning a
// Detaches this ReadableStream from its underlying controller state, returning a
// new ReadableStream instance that takes over the underlying state. This is used to
// support the "create a proxy" of a ReadableStream algorithm in the streams spec
// (see https://streams.spec.whatwg.org/#readablestream-create-a-proxy). In that
Expand Down
4 changes: 2 additions & 2 deletions src/workerd/api/streams/standard.c++
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ jsg::Promise<void> ReadableImpl<Self>::cancel(
if (consumerCount > 1) {
// If there is more than 1 consumer, then we just return here with an
// immediately resolved promise. The consumer will remove itself,
// canceling it's interest in the underlying source but we do not yet
// canceling its interest in the underlying source but we do not yet
// want to cancel the underlying source since there are still other
// consumers that want data.
return js.resolvedPromise();
Expand Down Expand Up @@ -3140,7 +3140,7 @@ kj::Promise<DeferredProxy<void>> ReadableStreamJsController::pumpTo(
disturbed = true;

// This operation will leave the ReadableStream locked and disturbed. It will consume
// the stream until it either closed or errors. If the deferred proxy promise or it's
// the stream until it either closed or errors. If the deferred proxy promise or its
// inner promise is dropped, the PumpToReader (and sink) will be dropped and the stream
// will be canceled. If the PumpToReader is dropped while there is a pending write on
// the sink, the pending write will be canceled.
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/streams/standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class WritableImpl {
struct Writable {};

// Sadly, we have to use a weak ref here rather than jsg::Ref. This is because
// the jsg::Ref<WritableStream> (via it's internal WritableStreamJsController)
// the jsg::Ref<WritableStream> (via its internal WritableStreamJsController)
// holds a strong reference to the jsg::Ref<WritableStreamDefaultController> that
// uses this WritableImpl. This creates a strong circular reference between jsg::Refs
// that isn't allowed. GcTracing ends up with a stack overflow as the two jsg::Refs
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/tests/url-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export const urlSearchParamsInit2 = {

export const urlSearchParamsInit3 = {
test() {
// If the initializer has a deleted iterator, then it's
// If the initializer has a deleted iterator, then its
// contents are ignored but can still be interpreted as
// a dictionary.
const search1 = new URLSearchParams('a=b');
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/api/url-standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace workerd::api {
// The original URL implementation based on kj::Url is not compliant with the
// WHATWG URL standard, but we can't get rid of it. This is an alternate
// implementation that is based on the spec. It can be enabled using a
// configuration flag. We put it in it's own namespace to keep it's classes
// configuration flag. We put it in its own namespace to keep its classes
// from conflicting with the old implementation.
namespace url {

Expand Down
8 changes: 4 additions & 4 deletions src/workerd/api/worker-rpc.c++
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ rpc::JsRpcTarget::Client JsRpcProperty::getClientForOneCall(

namespace {

struct JsRpcPromiseAndPipleine {
struct JsRpcPromiseAndPipeline {
jsg::JsPromise promise;
kj::Own<JsRpcPromise::WeakRef> weakRef;
rpc::JsRpcTarget::CallResults::Pipeline pipeline;
Expand All @@ -444,7 +444,7 @@ struct JsRpcPromiseAndPipleine {
};

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

try {
return js.tryCatch([&]() -> JsRpcPromiseAndPipleine {
return js.tryCatch([&]() -> JsRpcPromiseAndPipeline {
// `path` will be filled in with the path of property names leading from the stub represented by
// `client` to the specific property / method that we're trying to invoke.
kj::Vector<kj::StringPtr> path;
Expand Down Expand Up @@ -578,7 +578,7 @@ JsRpcPromiseAndPipleine callImpl(jsg::Lock& js,
.weakRef = kj::mv(weakRef),
.pipeline = kj::mv(callResult),
};
}, [&](jsg::Value error) -> JsRpcPromiseAndPipleine {
}, [&](jsg::Value error) -> JsRpcPromiseAndPipeline {
// Probably a serialization error. Need to convert to an async error since we never throw
// synchronously from async functions.
auto jsError = jsg::JsValue(error.getHandle(js));
Expand Down
6 changes: 3 additions & 3 deletions src/workerd/api/worker-rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace workerd::api {
// separate calls.
constexpr size_t MAX_JS_RPC_MESSAGE_SIZE = 1u << 20;

// ExternalHandler used when serializing RPC messages. Serialization functions which whish to
// ExternalHandler used when serializing RPC messages. Serialization functions with which to
// handle RPC specially should use this.
class RpcSerializerExternalHander final: public jsg::Serializer::ExternalHandler {
public:
Expand Down Expand Up @@ -81,7 +81,7 @@ class RpcSerializerExternalHander final: public jsg::Serializer::ExternalHandler
class RpcStubDisposalGroup;
class StreamSinkImpl;

// ExternalHandler used when deserializing RPC messages. Deserialization functions which whish to
// ExternalHandler used when deserializing RPC messages. Deserialization functions with which to
// handle RPC specially should use this.
class RpcDeserializerExternalHander final: public jsg::Deserializer::ExternalHandler {
public:
Expand Down Expand Up @@ -144,7 +144,7 @@ class JsRpcTarget: public jsg::Object {
// Common superclass of JsRpcStub and Fetcher, the two types that may serve as the basis for
// RPC calls.
//
// This class is NOT part of the JavaScript class heirarchy (it has no JSG_RESOURCE_TYPE block),
// This class is NOT part of the JavaScript class hierarchy (it has no JSG_RESOURCE_TYPE block),
// it's only a C++ class used to abstract how to get a capnp client out of the object.
class JsRpcClientProvider: public jsg::Object {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/io/compatibility-date.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef {
$compatEnableDate("2022-01-31")
$compatDisableFlag("workers_api_getters_setters_on_instance");
# Originally, JSG_PROPERTY registered getter/setters on an objects *instance*
# template as opposed to it's prototype template. This broke subclassing at
# template as opposed to its prototype template. This broke subclassing at
# the JavaScript layer, preventing a subclass from correctly overriding the
# superclasses getters/setters. This flag controls the breaking change made
# to set those getters/setters on the prototype template instead.
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/io/io-own.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class DeleteQueue: public kj::AtomicRefcounted {
friend class IoContext;
};

// Object which can push actions into a specific DeleteQueue then signal it's
// Object which can push actions into a specific DeleteQueue then signal its
// owning IoContext to wake up to process the queue. This is a bit of a hack of
// the DeleteQueue concept that allows us to use the same queue for more than
// just deletions.
Expand Down
4 changes: 2 additions & 2 deletions src/workerd/io/worker.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ Worker::Isolate::Isolate(kj::Own<Api> apiParam,
// The PromiseCrossContextResolveCallback is used to ensure that promise reactions
// are only scheduled on the microtask queue from the appropriate IoContext for the
// promise. Huh? Yeah, that's not super clear... let me explain a bit more.
// Every request runs in it's own IoContext.
// Every request runs in its own IoContext.
// Some I/O objects are bound to the IoContext when they are created.
// If these objects are accessed from the wrong IoContext, things blow up.
// If I create a promise in one request and pass the resolve/reject functions
Expand Down Expand Up @@ -2208,7 +2208,7 @@ void Worker::Lock::validateHandlers(ValidationErrorReporter& errorReporter) {
}
for (auto& entry: worker.impl->statelessClasses) {
// We want to report all of the stateless class's members. To do this, we examine its
// prototype, and it's prototype's prototype, and so on, until we get to Object's
// prototype, and its prototype's prototype, and so on, until we get to Object's
// prototype, which we ignore.
auto entrypointName = getEntrypointName(entry.key);
js.withinHandleScope([&]() {
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/jsg/jsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ using HasGetTemplateOverload =
static constexpr decltype(jsgSerializeTag) jsgSerializeOldTags[] = {}; \
static constexpr auto jsgSerializeOneway = true

// Declares a wildcart property getter. If a property is requested that isn't already present on
// Declares a wildcard property getter. If a property is requested that isn't already present on
// the object or its prototypes, the wildcard property getter will be given a chance to return the
// property.
//
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/jsg/modules-new.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ struct ResolveContext final {
// The abstraction of a module within the ModuleRegistry.
// Importantly, a Module is immutable once created and must be thread-safe.
// The Module class itself represents the definition of a module and not
// it's actual instantiation.
// its actual instantiation.
class Module {
public:
enum class Type : uint8_t {
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/jsg/observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct ResolveObserver {
// The resolve is being performed in the context of a builtin module
// (that is, one of the modules built into the worker runtime).
BUILTIN,
// Like builtin, the but it's a module that is *only* resolvable from a builtin
// Like builtin, but it's a module that is *only* resolvable from a builtin
// (like the `node-internal:...` modules)
BUILTIN_ONLY,
};
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/jsg/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ v8::Local<v8::Value> deepClone(v8::Local<v8::Context> context, v8::Local<v8::Val
//
// TODO(cleanup): Call sites should migrate to the new js.str(...) variants on jsg::Lock
// rather than calling v8Str directly. Once the migration is a big further along, v8Str
// and it's variants will be explicitly marked deprecated.
// and its variants will be explicitly marked deprecated.
template <typename T>
v8::Local<v8::String> v8Str(v8::Isolate* isolate,
kj::ArrayPtr<T> ptr,
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/server/server.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ kj::Own<Server::Service> Server::makeDiskDirectoryService(kj::StringPtr name,
// =======================================================================================

// This class exists to update the InspectorService's table of isolates when a config
// has multiple services. The InspectorService exists on the stack of it's own thread and
// has multiple services. The InspectorService exists on the stack of its own thread and
// initializes state that is bound to the thread, e.g. a http server and an event loop.
// This class provides a small thread-safe interface to the InspectorService so <name>:<isolate>
// mappings can be added after the InspectorService has started.
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/util/sqlite-kv.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SqliteKv: private SqliteDatabase::ResetListener {

enum Order { FORWARD, REVERSE };

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

0 comments on commit bc38351

Please sign in to comment.