diff options
author | Moonchild <moonchild@palemoon.org> | 2020-10-31 17:31:38 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-10-31 17:31:38 +0100 |
commit | bb4e9ad1c8a13232904079c28d03b5d69cd39c35 (patch) | |
tree | 438f62f51f5df8db2f730479592b5a0cc21b2e9c /js/src/jsapi.cpp | |
parent | 9b1406f183705e81701d9136f6df63cae72b5362 (diff) | |
download | uxp-bb4e9ad1c8a13232904079c28d03b5d69cd39c35.tar.gz |
[devtools] More gracefully (than a crash) handle stack capture failures.
Diffstat (limited to 'js/src/jsapi.cpp')
-rw-r--r-- | js/src/jsapi.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 6ed4d1d89a..dab4c25a43 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -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); |