Closed Bug 281322 Opened 20 years ago Closed 19 years ago

Minimo should use the newer nsIPrefService APIs instead of nsIPref

Categories

(Minimo Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vhaarr+bmo, Assigned: vhaarr+bmo)

References

()

Details

Attachments

(1 file, 4 obsolete files)

Rid the source of nsIPref!
Attached patch version 0.1 (obsolete) — Splinter Review
I found this code quite strange, with all the do_CreateInstance.
+  nsCOMPtr<nsIPrefBranch> pref = do_GetService(NS_PREF_CONTRACTID);

use should use NS_PREFSERVICE_CONTRACTID for the new nsIPrefService-interfaces

Attached patch version 0.2 (obsolete) — Splinter Review
That's what you get for not compiling :P
I don't know how to build Minimo, but if someone tells me, I'll do that.

In any case, the bug was more for bugging dougt about doing do_CreateInstance
:)
Attachment #173583 - Attachment is obsolete: true
Attached patch version 0.3 (obsolete) — Splinter Review
heh, forgot a do_CreateInstance
Attachment #173645 - Attachment is obsolete: true
Attached patch version 0.4 (obsolete) — Splinter Review
updated to fix bitrot
Attachment #173649 - Attachment is obsolete: true
Attachment #195020 - Flags: review?(dougt)
Comment on attachment 195020 [details] [diff] [review]
version 0.4

looks fine.
Attachment #195020 - Flags: review?(dougt) → review+
I just found
<http://lxr.mozilla.org/mozilla/source/embedding/minimo/app/mozilla_api.cpp#260>,
which needs to be fixed as well, but I'm not quite sure what needs to be done there.
(In reply to comment #7)
> <http://lxr.mozilla.org/mozilla/source/embedding/minimo/app/mozilla_api.cpp#260>,
> which needs to be fixed as well, but I'm not quite sure what needs to be done
there.

what needs fixing there?
I removed
-#define PREF_ID NS_PREF_CONTRACTID
in attachment 195020 [details] [diff] [review] ...

Problem is I'm not sure if
nsCOMPtr<nsIPrefService> prefService = do_GetService (PREF_ID);
is the right way of getting a pref service or not, but I'm sure you know, biesi :-)
If it is, the fix is simply to switch it for
nsCOMPtr<nsIPrefService> prefService = do_GetService (NS_PREF_CONTRACTID);

(Why the #define PREF_ID NS_PREF_CONTRACTID anyway?)
oh. just use do_GetService(NS_PREFSERVICE_CONTRACTID);
I've been trying to build Minimo a few times now with different .mozconfigs,
but I keep getting compile errors related to XFT - so I can't really check if
the patch builds :-/

It should be alright now, though. I've grep'ed through the source and PREF_ID
isn't used anywhere else, so there shouldn't be any compile errors.
Attachment #195020 - Attachment is obsolete: true
Attachment #195037 - Flags: review+
embedding/minimo/app is deprecated.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: