Skip to content

Commit eed10dd

Browse files
Apply suggestions from code review
fix typos Co-authored-by: Pierre Tachoire <pierre@lightpanda.io>
1 parent 6bf2ff9 commit eed10dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/runtime/js.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
725725
// which case resolver_promise cannot be null.
726726
module: ?PersistentModule = null,
727727

728-
// The promise of the evaluting module. The resolved value is
728+
// The promise of the evaluating module. The resolved value is
729729
// meaningless to us, but the resolver promise needs to chain
730730
// to this, since we need to know when it's complete.
731731
module_promise: ?PersistentPromise = null,
@@ -842,7 +842,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
842842
pub fn module(self: *JsContext, comptime want_result: bool, src: []const u8, url: []const u8, cacheable: bool) !(if (want_result) ModuleEntry else void) {
843843
if (cacheable) {
844844
if (self.module_cache.get(url)) |entry| {
845-
// The dynamic import will creaet an entry withouth the
845+
// The dynamic import will create an entry without the
846846
// module to prevent multiple calls from asynchronously
847847
// loading the same module. If we're here, without the
848848
// module, then it's time to load it.
@@ -874,7 +874,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
874874

875875
if (comptime !want_result) {
876876
// avoid creating a bunch of persisted objects if it isn't
877-
// cachachable and the caller doesn't care about results.
877+
// cacheable and the caller doesn't care about results.
878878
// This is pretty common, i.e. every <script type=module>
879879
// within the html page.
880880
if (!cacheable) {
@@ -1836,9 +1836,9 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
18361836
state.namespace = module_entry.module.?.castToModule().getModuleNamespace();
18371837

18381838
// We've gotten the source for the module and are evaluating it.
1839-
// You might thing we're done, but the module evaluation is
1839+
// You might think we're done, but the module evaluation is
18401840
// itself asynchronous. We need to chain to the module's own
1841-
// promise. When the module is evalutated, it resolves to the
1841+
// promise. When the module is evaluated, it resolves to the
18421842
// last value of the module. But, for module loading, we need to
18431843
// resolve to the module's namespace.
18441844

@@ -1854,7 +1854,7 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
18541854
// The microtask is tied to the isolate, not the context
18551855
// it can be resolved while another context is active
18561856
// (Which seems crazy to me). If that happens, then
1857-
// another page was loaded and we MUST ignore thise
1857+
// another page was loaded and we MUST ignore this
18581858
// (most of the fields in state are not valid)
18591859
return;
18601860
}

0 commit comments

Comments
 (0)