Fix remaining compilation errors

- Make BundlerPlugin::visitAdditionalChildren templated to support AbstractSlotVisitor
- Move template implementation to header file for proper instantiation
- All tests now pass successfully
This commit is contained in:
Claude Bot
2025-09-09 21:54:05 +00:00
parent 5f612dd2ba
commit c605abc61c
2 changed files with 7 additions and 6 deletions

View File

@@ -159,11 +159,7 @@ void BundlerPlugin::tombstone()
// virtualModulesList will be cleaned up by destructor
}
void BundlerPlugin::visitAdditionalChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
{
deferredPromises.visit(cell, visitor);
virtualModulesList.visit(cell, visitor);
}
// Template implementation moved to header file
static const HashTableValue JSBundlerPluginHashTable[] = {
{ "addFilter"_s, static_cast<unsigned>(JSC::PropertyAttribute::Function | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontDelete), NoIntrinsic, { HashTableValue::NativeFunctionType, jsBundlerPluginFunction_addFilter, 3 } },

View File

@@ -125,7 +125,12 @@ public:
JSC::JSObject* getVirtualModule(const String& path);
void addVirtualModule(JSC::VM& vm, JSC::JSCell* owner, const String& path, JSC::JSObject* moduleFunction);
void tombstone();
void visitAdditionalChildren(JSC::JSCell*, JSC::SlotVisitor&);
template<typename Visitor>
void visitAdditionalChildren(JSC::JSCell* cell, Visitor& visitor)
{
deferredPromises.visit(cell, visitor);
virtualModulesList.visit(cell, visitor);
}
BundlerPlugin(void* config, BunPluginTarget target, JSBundlerPluginAddErrorCallback addError, JSBundlerPluginOnLoadAsyncCallback onLoadAsync, JSBundlerPluginOnResolveAsyncCallback onResolveAsync)
: addError(addError)