Closed
Bug 294683
Opened 20 years ago
Closed 20 years ago
xulrunner should use env var to remember path to appdata file
Categories
(Toolkit Graveyard :: XULRunner, defect)
Toolkit Graveyard
XULRunner
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: darin.moz, Assigned: benjamin)
Details
Attachments
(1 file)
|
5.84 KB,
patch
|
darin.moz
:
first-review+
asa
:
approval-aviary1.1a1+
|
Details | Diff | Splinter Review |
xulrunner should use env var to remember path to appdata file right now, we augment the command line with a "-app" command line flag, but this might interfere with other command line handling done by the application. it'd be better to strip the path-to-appdata-file command line argument and stash it in an env var for use when we need to restart the application.
| Assignee | ||
Updated•20 years ago
|
Assignee: nobody → benjamin
| Assignee | ||
Comment 1•20 years ago
|
||
Attachment #184510 -
Flags: first-review?(darin)
| Reporter | ||
Comment 2•20 years ago
|
||
Comment on attachment 184510 [details] [diff] [review] Add XUL_APP-FILE envvar, rev. 1 >Index: toolkit/xre/nsAppRunner.cpp >+ PR_SetEnv("XUL_APP_FILE="); nit: why bother clearing this env var? it seems that nsAppRunner.cpp should not know about details of nsXULRunnerApp.cpp. >Index: xulrunner/app/nsXULRunnerApp.cpp >+ const char *appDataFile = PR_GetEnv("XUL_APP_FILE"); > >+ if (! (appDataFile && *appDataFile)) { nit: kill the space after the "!" >+ if (IsArg(argv[1], "app")) { >+ if (argc == 2) { >+ Output(PR_TRUE, "Error: APP-FILE must be specified!\n"); nit: maybe this should be Usage() ? r=darin
Attachment #184510 -
Flags: first-review?(darin) → first-review+
| Assignee | ||
Comment 3•20 years ago
|
||
> nit: why bother clearing this env var? it seems that nsAppRunner.cpp
> should not know about details of nsXULRunnerApp.cpp.
We need to clear the envvar for the same reason we need to clear the other
"restart variables", because otherwise one xulapp cannot launch another one (the
envvar would override. I thought about adding a nsXULAppAPI hook for "clearing
stuff after we've restarted" or something like that, but it sounded like overkill.| Assignee | ||
Comment 4•20 years ago
|
||
Comment on attachment 184510 [details] [diff] [review] Add XUL_APP-FILE envvar, rev. 1 xulrunner only fixup.
Attachment #184510 -
Flags: approval-aviary1.1a1?
| Reporter | ||
Comment 5•20 years ago
|
||
Agreed on clearing the env var. Thanks for reminding me of that reason.
Comment 6•20 years ago
|
||
Comment on attachment 184510 [details] [diff] [review] Add XUL_APP-FILE envvar, rev. 1 a=asa
Attachment #184510 -
Flags: approval-aviary1.1a1? → approval-aviary1.1a1+
| Assignee | ||
Comment 7•20 years ago
|
||
fixed on trunk
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta2
Updated•9 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•