mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
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:
@@ -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 } },
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user