Fix crash with path parse in win32 (#3187)

* Update CommonJSModuleRecord.cpp

* smaller

* [node:path] Fix crash, mark TODO

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2023-06-03 00:14:27 -07:00
committed by GitHub
parent 21bc3a9c39
commit 59d7c47e3f
5 changed files with 86 additions and 15 deletions

View File

@@ -392,7 +392,7 @@ JSC::SourceCode createCommonJSModule(
// 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
// https://github.com/oven-sh/bun/issues/3161
globalObject->clearGlobalScopeExtension();
JSWithScope* withScope = JSWithScope::create(vm, globalObject, globalObject->globalScope(), scopeExtensionObject);