Closed Bug 404134 Opened 17 years ago Closed 17 years ago

Allow XULRunner apps to override name & vendor

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

Attachments

(1 file, 1 obsolete file)

XULRunner applications, like Prism, try to simulate many different applications but are really the same XUL application launched with different flags. However, the toolkit considers each launch to be part of the same process. On Mac, the toolkit refuses to load additional launches because of this.

We could explore ways to allow XUL apps to override the Name & Vendor of their application.ini, which would convince the system that this instance is not the same as any other running instance. There is already a simple use of override.ini to disable profile migration. The plan is to extend override.ini to allow changing the Name and Vendor properties too.

This would also allow each launch to have separate profiles, without resorting to playing with -P or -profile.
This patch adds a simple override of Name and Vendor. The path to the override is passed on the commandline (it is not assumed to be in a known folder).

BSmedberg - I'm not entirely happy the "Override" method and the "SetAllocatedString" function are duplicated. I could move the "Override" code to act like the XRE_CreateAppData / XRE_ParseAppData -> XRE_OverrideAppData, if you feel it is needed.

Also, this patch only addresses XULRunner launching. Firefox -app launching will need to be fixed similarly, but I wanted to handle that in a separate patch.
Assignee: nobody → mark.finkle
Status: NEW → ASSIGNED
Attachment #289112 - Flags: review?(benjamin)
Comment on attachment 289112 [details] [diff] [review]
Adds Name and Vendor override capability to xulrunner and xulrunner-stub

I really don't think you need to duplicate all this code.... can't you just call XRE_ParseAppData(ovrDataLF, appData)?
Attachment #289112 - Flags: review?(benjamin) → review-
Using XRE_ParseAppData does remove some duped code
Attachment #289112 - Attachment is obsolete: true
Attachment #290505 - Flags: review?(benjamin)
Attachment #290505 - Flags: review?(benjamin) → review+
Attachment #290505 - Flags: approval1.9?
Attachment #290505 - Flags: approval1.9? → approval1.9+
Checking in app/nsXULRunnerApp.cpp;
/cvsroot/mozilla/xulrunner/app/nsXULRunnerApp.cpp,v  <--  nsXULRunnerApp.cpp
new revision: 1.37; previous revision: 1.36
done
Checking in stub/nsXULStub.cpp;
/cvsroot/mozilla/xulrunner/stub/nsXULStub.cpp,v  <--  nsXULStub.cpp
new revision: 1.11; previous revision: 1.10
done
Can this bug be resolved as fixed? Patch was checked-in...
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: