Closed Bug 321237 Opened 19 years ago Closed 19 years ago

Make NS_OS_CURRENT_PROCESS_DIR correct for xulrunner apps

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: benjamin)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Now that we're in 1.9, we should make NS_OS_CURRENT_PROCESS_DIR correct for xulrunner apps (it should point to the app directory, not the xulrunner directory). NS_GRE_DIR will point to the xulrunner directory. This is probably going to be a slightly destabilizing change, because it will change what resource:/// points to in xulrunner apps (it shouldn't affect firefox that much because the xulrunner dir and the app dir are still the same). This will help me to expose profile-management APIs to embedding apps by unifying nsXREDirProvider and nsEmbedDirProvider.
Attachment #206621 - Flags: first-review?(robert.bugzilla)
Hmm... we invented resource://app/ to locate resources in the xulrunner app. Are you saying that we should deprecate that in favor of resource:/// ?
Probably, yes, or at least promise that they'll always be the same. The only reason I didn't suggest this earlier is that there are probably a significant number of places in our code that use resource:/// when they actually mean to be using resource://gre/.
Comment on attachment 206621 [details] [diff] [review] Rework NS_OS_CURRENT_PROCESS_DIR and NS_GRE_DIR, rev. 1 > NS_ENSURE_ARG(aLibXULDirectory); >- NS_ENSURE_ARG(aAppDirectory); >+ >+ if (!aAppDirectory) >+ aAppDirectory = aLibXULDirectory; Looks good. I'm curious if this change is just a nice to have or is there currently a case where this is necessary?
Attachment #206621 - Flags: first-review?(robert.bugzilla) → first-review+
The embedfunctions change is mostly unrelated, it just has to do with my starting to port gtkmozmebed to XRE_InitEmbedding and realizing that there are situations where there is no "application directory".
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Depends on: 331133
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: