Skip to content
Commit Detail

Commit 04e3626

Author
Dan Lapid <dan.lapid@gmail.com> 2025-04-22 23:49:09 +0000
Parents
593655d
Tree
2301886
Fix Python Workers when nodejs_compat_v2 is enabled.

For Python Workers the global scope is instantiated before a Worker::Isolate
is created and with just a plain jsg::Lock rather than a Worker::Isolate::Lock.
That means FeatureFlags::get(js) will fail.

Having this KJ_REQUIRE here does not serve any purpose as these APIs are
already behind a compat flag in the JSG_RESOURCE definition.

There's something to be said about whether FeatureFlags::get(js) should even
rely on Worker::Isolate::Lock but that does not need to be resolved in this PR.
This PR is meant to provide an immediate fix to allow Python Workers to set nodejs_compat_v2.

Files changed

1 file changed~1 modified