[js] Handle dead wrappers

This commit is contained in:
André Bargull 2023-09-27 15:23:57 +02:00 committed by roytam1
commit 51e4b86e6d

View file

@ -537,8 +537,12 @@ JSObject*
PromiseObject::resolutionSite()
{
auto debugInfo = PromiseDebugInfo::FromPromise(this);
if (debugInfo)
return debugInfo->resolutionSite();
if (debugInfo) {
JSObject* site = debugInfo->resolutionSite();
if (site && !JS_IsDeadWrapper(site)) {
return site;
}
}
return nullptr;
}