Add comment

This commit is contained in:
Jarred Sumner
2023-06-02 16:39:16 -07:00
parent bfd315fc72
commit 132ab63a32

View File

@@ -391,6 +391,8 @@ JSC::SourceCode createCommonJSModule(
// to pass to that and it isn't used directly much, so that
// seems harder to do correctly.
{
// We must use a global scope extension or else the JSWithScope will be collected unexpectedly.
// https://github.com/oven-sh/issues/3161
globalObject->clearGlobalScopeExtension();
JSWithScope* withScope = JSWithScope::create(vm, globalObject, globalObject->globalScope(), scopeExtensionObject);