mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 05:47:04 +00:00
Bug 386959 - crashreporter gets wrong restart arguments for xulrunner apps, r=bsmedberg
This commit is contained in:
parent
e99073ff83
commit
b91f78af35
@ -434,6 +434,21 @@ int main(int argc, char** argv)
|
||||
// we don't need to actually send this
|
||||
queryParameters.erase("ServerURL");
|
||||
|
||||
// re-set XUL_APP_FILE for xulrunner wrapped apps
|
||||
const char *appfile = getenv("MOZ_CRASHREPORTER_RESTART_XUL_APP_FILE");
|
||||
if (appfile && *appfile) {
|
||||
const char prefix[] = "XUL_APP_FILE=";
|
||||
char *env = (char*) malloc(strlen(appfile)+strlen(prefix));
|
||||
if (!env) {
|
||||
UIError("Out of memory");
|
||||
return 0;
|
||||
}
|
||||
strcpy(env, prefix);
|
||||
strcat(env, appfile);
|
||||
putenv(env);
|
||||
free(env);
|
||||
}
|
||||
|
||||
vector<string> restartArgs;
|
||||
|
||||
ostringstream paramName;
|
||||
|
@ -470,6 +470,15 @@ SetRestartArgs(int argc, char **argv)
|
||||
|
||||
PR_SetEnv(env);
|
||||
|
||||
// make sure we save the info in XUL_APP_FILE for the reporter
|
||||
const char *appfile = PR_GetEnv("XUL_APP_FILE");
|
||||
if (appfile && *appfile) {
|
||||
envVar = "MOZ_CRASHREPORTER_RESTART_XUL_APP_FILE=";
|
||||
envVar += appfile;
|
||||
env = ToNewCString(envVar);
|
||||
PR_SetEnv(env);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
} // namespace CrashReporter
|
||||
|
Loading…
Reference in New Issue
Block a user