Skip to content

Further refine capnp::SchemaLoader ownership#5065

Merged
jasnell merged 1 commit intomainfrom
jasnell/new-module-registry-refine-schemaloader-ownership
Sep 15, 2025
Merged

Further refine capnp::SchemaLoader ownership#5065
jasnell merged 1 commit intomainfrom
jasnell/new-module-registry-refine-schemaloader-ownership

Conversation

@jasnell
Copy link
Copy Markdown
Collaborator

@jasnell jasnell commented Sep 12, 2025

In the original work here I missed that the SchemaLoader is needed during the construction of Worker::Script when using the older service worker syntax. This change moves the ownership of the SchemaLoader to the Worker::Script::Impl so that it is available during construction, with the ContextGlobal having a const reference to it.

The next step will be to move the capnp modules implementation out from the internal project into workerd.

@jasnell jasnell requested review from a team and danlapid September 12, 2025 16:51
@jasnell jasnell requested review from a team as code owners September 12, 2025 16:51
@jasnell jasnell requested a review from guybedford September 12, 2025 16:52
@jasnell jasnell force-pushed the jasnell/new-module-registry-refine-schemaloader-ownership branch from 9a12368 to 8e60da4 Compare September 12, 2025 17:13
In the original work here I missed that the SchemaLoader is
needed during the construction of Worker::Script when using
the older service worker syntax. This change moves the ownership
of the SchemaLoader to the Worker::Script::Impl so that it is
available during construction, with the ContextGlobal having
a const reference to it.

The next step will be to move the capnp modules implementation
out from the internal project into workerd.
@jasnell jasnell force-pushed the jasnell/new-module-registry-refine-schemaloader-ownership branch from 8e60da4 to aea252f Compare September 15, 2025 15:03
@jasnell jasnell merged commit ac004fc into main Sep 15, 2025
21 of 23 checks passed
@jasnell jasnell deleted the jasnell/new-module-registry-refine-schemaloader-ownership branch September 15, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants