diff options
author | André Bargull <andre.bargull@gmail.com> | 2023-09-27 15:23:57 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-09-27 21:55:19 +0200 |
commit | 13c6b7422d265596d09cb616b325c801886aa4b0 (patch) | |
tree | 7c945beac2e246e38fcf5d8d74a065591477032b | |
parent | 24f2e663cd867d31dae853e19e36a274891f3e47 (diff) | |
download | uxp-13c6b7422d265596d09cb616b325c801886aa4b0.tar.gz |
[js] Handle dead wrappers
-rw-r--r-- | js/src/builtin/Promise.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp index daeb2c3d68..7d4c232f2e 100644 --- a/js/src/builtin/Promise.cpp +++ b/js/src/builtin/Promise.cpp @@ -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; } |