Compare commits

...

3 Commits

Author SHA1 Message Date
Alistair Smith
20584f3fa6 Merge branch 'main' into claude/webkit-upgrade-5c046702 2025-08-04 13:42:41 -07:00
autofix-ci[bot]
651debebf0 [autofix.ci] apply automated fixes 2025-08-04 12:23:43 +00:00
Claude Bot
3843c9644c Upgrade WebKit to 5c046702474d08edd6319a653919392e461d76ab
- Updated WebKit version from 642e2252f6298387edb6d2f991a0408fd0320466 to 5c046702474d08edd6319a653919392e461d76ab
- Fixed NodeVMSyntheticModule to use new SyntheticModuleRecord API
- Replaced deprecated setModuleEnvironment with tryCreateWithExportNamesAndValues
- The new API handles module environment creation internally, eliminating the need for manual setup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 12:20:08 +00:00
2 changed files with 28 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use")
option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading")
if(NOT WEBKIT_VERSION)
set(WEBKIT_VERSION 642e2252f6298387edb6d2f991a0408fd0320466)
set(WEBKIT_VERSION 5c046702474d08edd6319a653919392e461d76ab)
endif()
string(SUBSTRING ${WEBKIT_VERSION} 0 16 WEBKIT_VERSION_PREFIX)

View File

@@ -94,24 +94,36 @@ void NodeVMSyntheticModule::createModuleRecord(JSGlobalObject* globalObject)
{
VM& vm = globalObject->vm();
SyntheticModuleRecord* moduleRecord = SyntheticModuleRecord::create(globalObject, vm, globalObject->syntheticModuleRecordStructure(), Identifier::fromString(vm, identifier()));
m_moduleRecord.set(vm, this, moduleRecord);
SymbolTable* exportSymbolTable = SymbolTable::create(vm);
ScopeOffset offset = exportSymbolTable->takeNextScopeOffset(NoLockingNecessary);
exportSymbolTable->set(NoLockingNecessary, vm.propertyNames->starNamespacePrivateName.impl(), SymbolTableEntry(VarOffset(offset)));
// Convert export names to Vector<Identifier>
Vector<Identifier, 4> exportIdentifiers;
for (const String& exportName : m_exportNames) {
auto offset = exportSymbolTable->takeNextScopeOffset(NoLockingNecessary);
Identifier exportIdentifier = Identifier::fromString(vm, exportName);
moduleRecord->addExportEntry(SyntheticModuleRecord::ExportEntry::createLocal(exportIdentifier, exportIdentifier));
exportSymbolTable->set(NoLockingNecessary, exportIdentifier.releaseImpl().get(), SymbolTableEntry(VarOffset(offset)));
exportIdentifiers.append(Identifier::fromString(vm, exportName));
}
JSModuleEnvironment* moduleEnvironment = JSModuleEnvironment::create(vm, globalObject, nullptr, exportSymbolTable, jsTDZValue(), moduleRecord);
moduleRecord->setModuleEnvironment(globalObject, moduleEnvironment);
// Create empty export values - they will be filled later during evaluation
MarkedArgumentBuffer exportValues;
for (size_t i = 0; i < m_exportNames.size(); ++i) {
exportValues.append(jsUndefined());
}
// Use the new API that handles module environment creation internally
SyntheticModuleRecord* moduleRecord = SyntheticModuleRecord::tryCreateWithExportNamesAndValues(
globalObject,
Identifier::fromString(vm, identifier()),
exportIdentifiers,
exportValues);
if (!moduleRecord) {
// Fallback to old approach if new API fails
moduleRecord = SyntheticModuleRecord::create(globalObject, vm, globalObject->syntheticModuleRecordStructure(), Identifier::fromString(vm, identifier()));
for (const String& exportName : m_exportNames) {
Identifier exportIdentifier = Identifier::fromString(vm, exportName);
moduleRecord->addExportEntry(SyntheticModuleRecord::ExportEntry::createLocal(exportIdentifier, exportIdentifier));
}
}
m_moduleRecord.set(vm, this, moduleRecord);
}
void NodeVMSyntheticModule::ensureModuleRecord(JSGlobalObject* globalObject)