diff options
author | André Bargull <andre.bargull@gmail.com> | 2023-09-27 15:23:57 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-09-27 15:23:57 +0200 |
commit | be4b71b580e2959507b5a03b8a2085e238267085 (patch) | |
tree | 019f75712a80958cfbf36089f5df2b9a95a11440 /js | |
parent | de91800956e6393d436a261cb91ba2dbc470e19a (diff) | |
download | uxp-be4b71b580e2959507b5a03b8a2085e238267085.tar.gz |
[js] Handle dead wrappers
Diffstat (limited to 'js')
-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; } |