Fix unnecessary reinterpret_casts from JSGlobalObject to Zig::GlobalObject (#23387)

(For internal tracking: fixes STAB-1384)
This commit is contained in:
taylor.fish
2025-10-16 11:32:29 -07:00
committed by GitHub
parent 134341d2b4
commit 4142f89148
26 changed files with 60 additions and 60 deletions

View File

@@ -198,7 +198,7 @@ DEFINE_VISIT_CHILDREN(PendingVirtualModuleResult);
PendingVirtualModuleResult* PendingVirtualModuleResult::create(JSC::JSGlobalObject* globalObject, const WTF::String& specifier, const WTF::String& referrer, bool wasModuleLock)
{
auto* virtualModule = create(globalObject->vm(), reinterpret_cast<Zig::GlobalObject*>(globalObject)->pendingVirtualModuleResultStructure());
auto* virtualModule = create(globalObject->vm(), static_cast<Zig::GlobalObject*>(globalObject)->pendingVirtualModuleResultStructure());
virtualModule->finishCreation(globalObject->vm(), specifier, referrer);
virtualModule->wasModuleMock = wasModuleLock;
return virtualModule;
@@ -1153,7 +1153,7 @@ BUN_DEFINE_HOST_FUNCTION(jsFunctionOnLoadObjectResultResolve, (JSC::JSGlobalObje
bool wasModuleMock = pendingModule->wasModuleMock;
JSC::JSValue result = handleVirtualModuleResult<false>(reinterpret_cast<Zig::GlobalObject*>(globalObject), objectResult, &res, &specifier, &referrer, wasModuleMock);
JSC::JSValue result = handleVirtualModuleResult<false>(static_cast<Zig::GlobalObject*>(globalObject), objectResult, &res, &specifier, &referrer, wasModuleMock);
if (!scope.exception() && !res.success) [[unlikely]] {
throwException(globalObject, scope, result);
}