cpp: synchronize on JSC::getVM since its more likely to be forward compatible (#16688)

This commit is contained in:
Meghan Denny
2025-01-29 15:50:57 -08:00
committed by GitHub
parent 4d5ece3f63
commit 29839737df
175 changed files with 628 additions and 628 deletions

View File

@@ -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;