Closed Bug 278307 Opened 20 years ago Closed 20 years ago

When GRE_HOME is set, #ifndef XP_WIN32 and #ifndef XP_UNIX we return null unexpectedly

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Callek, Assigned: Callek)

References

()

Details

Attachments

(1 file)

This coming just adds an #else case where we just hope for the best with the
setting of GRE_HOME, rather than returning a null static here.

Patch coming...
Attached patch described fixSplinter Review
This is better than we have now...
Attachment #171206 - Flags: superreview?(darin)
Attachment #171206 - Flags: review?(darin)
Status: NEW → ASSIGNED
Comment on attachment 171206 [details] [diff] [review]
described fix

ok, sure.  add a space between '//' and 'hope' and r+sr=darin
Attachment #171206 - Flags: superreview?(darin)
Attachment #171206 - Flags: superreview+
Attachment #171206 - Flags: review?(darin)
Attachment #171206 - Flags: review+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 171206 [details] [diff] [review]
described fix

what about the unix case?  do you care if realpath fails?  do you want to have
a 'hope for the best' case xp?
> what about the unix case?  do you care if realpath fails?  do you want to have
> a 'hope for the best' case xp?

that's a good question.  callek, any thoughts?
This isnt really my area, and I only personally code/work on win32, but I would
assume if realpath fails then returning GRE_HOME would be a bad idea, since then
our code would assume the path is real when it was already checked and found to
be not.

if we want to set the static even if realpath fails, why bother with the check,
or even with the #if for that.  I would say the path check(s) are much better
than this #else cause, for any OS.  But the mere setting of GRE_HOME should not
have stripped any hope of making sGRELocation set.

...perhaps only the return if sGRELocation is set, and if not break through to
the following attempts, such as the win32 Registry check...

Any of these I would personally be happy with, as long as the simple setting of
GRE_HOME=anything does not make us fail sGRELocation on those OS's inertly as
before.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: