From b9c41e262438d85e2b3f0fb7905b69818ff875aa Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sat, 31 Oct 2020 17:31:38 +0100 Subject: [devtools] More gracefully (than a crash) handle stack capture failures. --- js/src/jsapi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js') 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 frame(cx); -- cgit v1.2.3