mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 08:07:30 +09:00
[js] Handle dead wrappers
This commit is contained in:
parent
bdff76bad2
commit
51e4b86e6d
1 changed files with 6 additions and 2 deletions
|
|
@ -537,8 +537,12 @@ JSObject*
|
||||||
PromiseObject::resolutionSite()
|
PromiseObject::resolutionSite()
|
||||||
{
|
{
|
||||||
auto debugInfo = PromiseDebugInfo::FromPromise(this);
|
auto debugInfo = PromiseDebugInfo::FromPromise(this);
|
||||||
if (debugInfo)
|
if (debugInfo) {
|
||||||
return debugInfo->resolutionSite();
|
JSObject* site = debugInfo->resolutionSite();
|
||||||
|
if (site && !JS_IsDeadWrapper(site)) {
|
||||||
|
return site;
|
||||||
|
}
|
||||||
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue