summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-10-31 17:31:38 +0100
committerMoonchild <moonchild@palemoon.org>2020-10-31 17:33:08 +0100
commitb9c41e262438d85e2b3f0fb7905b69818ff875aa (patch)
tree4c585a5625faab97fae39c4b21552fb65e0169a9 /js
parenta5203631d8cded437c05243cde17cddeba13e3ec (diff)
downloadUXP-b9c41e262438d85e2b3f0fb7905b69818ff875aa.tar
UXP-b9c41e262438d85e2b3f0fb7905b69818ff875aa.tar.gz
UXP-b9c41e262438d85e2b3f0fb7905b69818ff875aa.tar.lz
UXP-b9c41e262438d85e2b3f0fb7905b69818ff875aa.tar.xz
UXP-b9c41e262438d85e2b3f0fb7905b69818ff875aa.zip
[devtools] More gracefully (than a crash) handle stack capture failures.
Diffstat (limited to 'js')
-rw-r--r--js/src/jsapi.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
index c0f0e61cc..cd370e42c 100644
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -7040,7 +7040,9 @@ JS::CaptureCurrentStack(JSContext* cx, JS::MutableHandleObject stackp,
{
AssertHeapIsIdle(cx);
CHECK_REQUEST(cx);
- MOZ_RELEASE_ASSERT(cx->compartment());
+ if (!cx->compartment()) {
+ return false;
+ }
JSCompartment* compartment = cx->compartment();
Rooted<SavedFrame*> frame(cx);