Closed Bug 435033 Opened 14 years ago Closed 14 years ago

-override is not passed to spawned process on EM restart

Categories

(Toolkit Graveyard :: XULRunner, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: matthew.gertner, Assigned: matthew.gertner)

References

Details

Attachments

(1 file, 3 obsolete files)

When an app is run with -override and requires EM restart, the -override parameter is not passed to the new process.
Blocks: 434135
Seems like the overridden properties are needed before other args get processed/remove, so I add it back to gRestartArgv explicitly.
Assignee: mark.finkle → matthew.gertner
Status: NEW → ASSIGNED
Attachment #329981 - Flags: review?
Attachment #329981 - Attachment is obsolete: true
Attachment #330005 - Flags: review?
Attachment #329981 - Flags: review?
Attachment #330005 - Flags: review? → review?(benjamin)
Comment on attachment 330005 [details] [diff] [review]
Use gRestartArgc instead of gArgc and allocate enough space for override params

>Index: toolkit/xre/nsAppRunner.cpp

>+static char gOverrideFlag[] = "-override";

I know you're doing this because of const-ness, but please don't... instead see below.

>+  // Add the -override argument back (it is removed automatically be CheckArg) if there is one
>+  if (override) {
>+    gRestartArgv[gRestartArgc++] = gOverrideFlag;

gRestartArgv[gRestartArgc++] = const_cast<char*>("-override");

>+    gRestartArgv[gRestartArgc++] = (char *) override;

Please use const_cast instead of C-style casts.

All else this is fine.
Attachment #330005 - Flags: review?(benjamin) → review-
Attached patch Use const_cast (obsolete) — Splinter Review
Attachment #330005 - Attachment is obsolete: true
Attachment #330935 - Flags: review?(benjamin)
Attachment #330935 - Attachment is obsolete: true
Attachment #330936 - Flags: review?(benjamin)
Attachment #330935 - Flags: review?(benjamin)
Attachment #330936 - Flags: review?(benjamin) → review+
Keywords: checkin-needed
Landed: http://hg.mozilla.org/index.cgi/mozilla-central/rev/b2a93e3558c0
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.