[devtools] More gracefully (than a crash) handle stack capture failures.

master
Fedor 2020-11-26 05:41:21 +02:00
parent 86bf6ee6a1
commit 020f796a23
1 changed files with 3 additions and 1 deletions

View File

@ -7039,7 +7039,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);