Closed
Bug 273089
Opened 20 years ago
Closed 20 years ago
Add scriptable getters to nsXULAppAPI information.
Categories
(Toolkit :: Startup and Profile System, defect)
Toolkit
Startup and Profile System
Tracking
()
RESOLVED
FIXED
People
(Reporter: benjamin, Assigned: benjamin)
Details
Attachments
(1 file)
|
8.74 KB,
patch
|
darin.moz
:
first-review+
|
Details | Diff | Splinter Review |
This will in the future allow the extension manager to pick up the app UUID and other information from a scriptable interface, instead of using prefs.
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Attachment #167807 -
Flags: first-review?(darin)
Comment 2•20 years ago
|
||
Comment on attachment 167807 [details] [diff] [review] Scriptable nsXULAppAPI >Index: nsAppRunner.cpp >+NS_IMETHODIMP >+nsXULAppInfo::GetVendor(nsACString& aResult) >+{ >+ if (gAppData->appVendor) >+ aResult.Assign(gAppData->appVendor); >+ else >+ aResult.Truncate(); >+ >+ return NS_OK; >+} how about this instead: aResult.Assign(gAppData->appVendor ? gAppData->appVendor : ""); I'd probably null check the rest just like this. I know that some of the fields are required (and LoadAppInfo happens to make that a requirement), but we don't yet do similar checking for aAppInfo, and we don't document the required fields in nsXULAppAPI.h >Index: nsIXULAppInfo.idl maybe add a comment that this interface is not finished, may change with the addition of new fields, etc.
Attachment #167807 -
Flags: first-review?(darin) → first-review+
| Assignee | ||
Comment 3•20 years ago
|
||
Fixed on trunk. I added null-checks to everything except the "name" parameter, since if that's null we crash much earlier.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 4•20 years ago
|
||
+ * The contract id for the nsIXULAppInfo service. + */ +#define XULAPPINFO_SERVICE_CONTRACTID \ + "@mozilla.org/xre/app-info;1" can you also document what interfaces this implements and whether it is supposed to be used as a service or via createInstance?
| Assignee | ||
Updated•18 years ago
|
Flags: in-testsuite?
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in
before you can comment on or make changes to this bug.
Description
•