@@ -14,11 +14,12 @@ jsg::Ref<Fetcher> WorkerStub::getEntrypoint(jsg::Lock& js,
1414 jsg::Optional<kj::Maybe<kj::String>> name,
1515 jsg::Optional<EntrypointOptions> options) {
1616 Frankenvalue props;
17-
17+ kj::Maybe<ResourceLimits> limits;
1818 KJ_IF_SOME (o, options) {
1919 KJ_IF_SOME (p, o.props ) {
2020 props = Frankenvalue::fromJs (js, p.getHandle (js));
2121 }
22+ limits = o.limits ;
2223 }
2324
2425 kj::Maybe<kj::String> entrypointName;
@@ -30,19 +31,20 @@ jsg::Ref<Fetcher> WorkerStub::getEntrypoint(jsg::Lock& js,
3031 }
3132 }
3233
33- auto subreqChannel = channel->getEntrypoint (kj::mv (entrypointName), kj::mv (props));
34+ auto subreqChannel = channel->getEntrypoint (kj::mv (entrypointName), kj::mv (props), limits );
3435 return js.alloc <Fetcher>(IoContext::current ().addObject (kj::mv (subreqChannel)));
3536}
3637
3738jsg::Ref<DurableObjectClass> WorkerStub::getDurableObjectClass (jsg::Lock& js,
3839 jsg::Optional<kj::Maybe<kj::String>> name,
3940 jsg::Optional<EntrypointOptions> options) {
4041 Frankenvalue props;
41-
42+ kj::Maybe<ResourceLimits> limits;
4243 KJ_IF_SOME (o, options) {
4344 KJ_IF_SOME (p, o.props ) {
4445 props = Frankenvalue::fromJs (js, p.getHandle (js));
4546 }
47+ limits = o.limits ;
4648 }
4749
4850 kj::Maybe<kj::String> entrypointName;
@@ -55,7 +57,7 @@ jsg::Ref<DurableObjectClass> WorkerStub::getDurableObjectClass(jsg::Lock& js,
5557 }
5658
5759 return js.alloc <DurableObjectClass>(IoContext::current ().addObject (
58- channel->getActorClass (kj::mv (entrypointName), kj::mv (props))));
60+ channel->getActorClass (kj::mv (entrypointName), kj::mv (props), limits )));
5961}
6062
6163jsg::Ref<WorkerStub> WorkerLoader::get (
@@ -157,6 +159,7 @@ DynamicWorkerSource WorkerLoader::toDynamicWorkerSource(jsg::Lock& js,
157159
158160 return {.source = kj::mv (extractedSource),
159161 .compatibilityFlags = compatFlags,
162+ .limits = code.limits ,
160163 .env = kj::mv (env),
161164 .globalOutbound = kj::mv (globalOutbound),
162165 .tails = kj::mv (tailChannels),
0 commit comments