With MOZ_CRASHREPORTER_SHUTDOWN environment variable set the browser should quit with a non 0 exit code




2 years ago
8 months ago


(Reporter: whimboo, Unassigned)


(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)




2 years ago
With bug 1311016 we originally implemented the shutdown sequence for a content crash and MOZ_CRASHREPORTER_SHUTDOWN set. Sadly this causes Firefox to quit with the exit code 0.

To better reflect that the browser has been quit due to a crash we should select a non 0 exit code.

Has anyone an idea how to do this?

Comment 1

2 years ago
I'm going to link to the codepaths currently involved in setting a return value, but I don't see an obvious place to interject this.

rv here: http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/xre/nsAppRunner.cpp#4833
comes from the end of xre_mainrun where it calls nsAppStartup::Run: http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/xre/nsAppRunner.cpp#4571
which comes from here: http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/components/startup/nsAppStartup.cpp#288

Since return codes are fragile, please add an automated test to make sure this keeps working? I suspect you're aware of the old bug 894697 which asked for a generic API for setting the Firefox return code. I rejected that because at the time we couldn't write tests for it, and there are end-user cases where it would break. For specific automation needs where we know we're not going to be doing restarts for update that's less of a problem, but it's still going to be fragile.
Component: General → Startup and Profile System
Product: Firefox → Toolkit


a year ago
Priority: -- → P5


8 months ago
Depends on: 1449637
You need to log in before you can comment on or make changes to this bug.