Closed Bug 386959 Opened 15 years ago Closed 15 years ago

crashreporter gets wrong restart arguments for xulrunner apps

Categories

(Toolkit :: Crash Reporting, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wolfiR, Unassigned)

Details

Attachments

(1 file)

This only affects xulrunner apps started _not_ with the stub but via 
xulrunner application.ini

The crashreporter gets only the path to the xulrunner binary in that case and
therefore displays the "Restart" button but only raise the xulrunner usage description.

Since I still can't use the stub in my application I need another solution for that:
- don't display the Restart button if we get xulrunner as argv[0]
or
- make sure the application file is recognized by the crash reporter

I had a look at the latter option but I'm not sure why that doesn't work
right now.
The xulrunner binary removes the application.ini file from argv and sets
XUL_APP_FILE as env variable. I would expect that this env variable is still
available in the crashreporter environment as it's the case for the MOZ_CRASHREPORTER_RESTART_ARGS_* variables but somehow it's not.
So my idea would be to save the value to another (new) env variable prefixed with MOZ_CRASHREPORTER, read that in crashreporter.cpp and export it as XUL_APP_FILE to the environment again. But I'm not sure how to export it in the cross platform code since setenv() is not known to MSVC AFAICS.
Attached patch patchSplinter Review
Not sure if that's the best solution but it does what I need.
Attachment #271191 - Flags: review?(ted.mielczarek)
Comment on attachment 271191 [details] [diff] [review]
patch

I think I'd prefer to have bsmedberg review this.
Attachment #271191 - Flags: review?(ted.mielczarek) → review?(benjamin)
Comment on attachment 271191 [details] [diff] [review]
patch

weird, ok
Attachment #271191 - Flags: review?(benjamin) → review+
Checking in nsAirbagExceptionHandler.cpp;
/cvsroot/mozilla/toolkit/airbag/nsAirbagExceptionHandler.cpp,v  <--  nsAirbagExceptionHandler.cpp
new revision: 1.19; previous revision: 1.18
done
Checking in client/crashreporter.cpp;
/cvsroot/mozilla/toolkit/airbag/client/crashreporter.cpp,v  <--  crashreporter.cpp
new revision: 1.12; previous revision: 1.11
done
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.