Skip to content
Commit Detail

Commit 7fa78f7

Author
Pratham <67585967+git-bruh@users.noreply.github.com> 2026-04-10 13:39:56 +0530
Parents
6fc69a6
Tree
06f2918
Merge pull request #6547 from cloudflare/pkhanna/fix-worker-loader-crash

ensure worker stub subrequest channel is kept alive until internal startRequest call

When using `newPromisedWorkerInterface`, by the time the `.then()` callback is executed, it is possible for the subrequest channel itself to have gone out of scope due to GC kicking in, causing a crash when `startRequestImpl` tries to access the worker service

```js
// This pattern triggers the bug (fetcher can get GC'd)
const result = await dynamicWorker.getEntrypoint().foo(...);

// This doesn't (Fetcher is kept in scope, keeping the subrequest channel alive)
const e = dynamicWorker.getEntrypoint();
const result = await e.foo(...);
```

Closes #6441

Files changed

1 file changed~1 modified