We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe05b3f commit 26467c4Copy full SHA for 26467c4
1 file changed
content/base/src/nsContentUtils.cpp
@@ -3147,7 +3147,9 @@ nsCxPusher::DoPush(JSContext* cx)
3147
{
3148
nsIThreadJSContextStack* stack = nsContentUtils::ThreadJSContextStack();
3149
if (!stack) {
3150
- return;
+ // If someone tries to push a cx when we don't have the relevant state,
3151
+ // it's probably safest to just crash.
3152
+ MOZ_CRASH();
3153
}
3154
3155
if (cx && IsContextOnStack(stack, cx)) {
@@ -3178,7 +3180,8 @@ void
3178
3180
nsCxPusher::Pop()
3179
3181
3182
- if (!mPushedSomething || !stack) {
3183
+ MOZ_ASSERT(stack);
3184
+ if (!mPushedSomething) {
3185
mScx = nullptr;
3186
mPushedSomething = false;
3187
0 commit comments