mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
cpp: synchronize on JSC::getVM since its more likely to be forward compatible (#16688)
This commit is contained in:
@@ -10,7 +10,7 @@ generateObjectModuleSourceCode(JSC::JSGlobalObject* globalObject,
|
||||
JSC::Identifier moduleKey,
|
||||
Vector<JSC::Identifier, 4>& exportNames,
|
||||
JSC::MarkedArgumentBuffer& exportValues) -> void {
|
||||
JSC::VM& vm = lexicalGlobalObject->vm();
|
||||
auto& vm = JSC::getVM(lexicalGlobalObject);
|
||||
GlobalObject* globalObject = reinterpret_cast<GlobalObject*>(lexicalGlobalObject);
|
||||
JSC::EnsureStillAliveScope stillAlive(object);
|
||||
|
||||
@@ -43,7 +43,7 @@ generateObjectModuleSourceCodeForJSON(JSC::JSGlobalObject* globalObject,
|
||||
JSC::Identifier moduleKey,
|
||||
Vector<JSC::Identifier, 4>& exportNames,
|
||||
JSC::MarkedArgumentBuffer& exportValues) -> void {
|
||||
JSC::VM& vm = lexicalGlobalObject->vm();
|
||||
auto& vm = JSC::getVM(lexicalGlobalObject);
|
||||
GlobalObject* globalObject = reinterpret_cast<GlobalObject*>(lexicalGlobalObject);
|
||||
JSC::EnsureStillAliveScope stillAlive(object);
|
||||
|
||||
@@ -97,7 +97,7 @@ generateJSValueExportDefaultObjectSourceCode(JSC::JSGlobalObject* globalObject,
|
||||
JSC::Identifier moduleKey,
|
||||
Vector<JSC::Identifier, 4>& exportNames,
|
||||
JSC::MarkedArgumentBuffer& exportValues) -> void {
|
||||
JSC::VM& vm = lexicalGlobalObject->vm();
|
||||
auto& vm = JSC::getVM(lexicalGlobalObject);
|
||||
exportNames.append(vm.propertyNames->defaultKeyword);
|
||||
exportValues.append(value);
|
||||
const Identifier& esModuleMarker = vm.propertyNames->__esModule;
|
||||
|
||||
Reference in New Issue
Block a user