Closed
Bug 335692
Opened 18 years ago
Closed 18 years ago
Remove nsIPref from profile/pref-migrator
Categories
(Core Graveyard :: Profile: Migration, defect)
Core Graveyard
Profile: Migration
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: alfred.peng, Assigned: alfred.peng)
References
Details
Attachments
(1 file, 3 obsolete files)
21.82 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Replace nsIPref with nsIPrefBranch and nsIPrefService.
Assignee | ||
Comment 1•18 years ago
|
||
Some questions for the patch: 1. For the method GetComplexValue, nsIFileSpec has been marked as a deprecated argument. Do we need to remove it from nsPrefMigration::GetPremigratedFilePref? 2. nsIPref has a method named EnumerateChildren. I replace it with GetChildList in my patch. Don't know whether it's appropriate.
Comment 2•18 years ago
|
||
I'm not a great reviewer for this patch. I don't know much about this code, so it would take me a while to get to it. You might want to try someone who's reviewed nsIPref/nsIPrefBranch stuff before.
> Do we need to remove it from nsPrefMigration::GetPremigratedFilePref?
I doubt it...
Assignee | ||
Updated•18 years ago
|
Attachment #220018 -
Flags: review?(roc)
Assignee | ||
Comment 3•18 years ago
|
||
Comment on attachment 220018 [details] [diff] [review] Patch v1 caillon, roc, I checked on bugzilla and found out that you've helped review nsIPref/nsIPrefBranch related bugs. Hope you can help me review this one.
Attachment #220018 -
Flags: superreview?(roc)
Attachment #220018 -
Flags: review?(roc)
Attachment #220018 -
Flags: review?(caillon)
Attachment #220018 -
Flags: review?(bzbarsky)
Sorry about the delay Alfred. This patch needs to be updated to trunk. I promise I'll review it quickly next time.
Assignee | ||
Comment 5•18 years ago
|
||
Update the patch based on the change of the trunk. roc, it's fine. Anyway, thanks for your review :-)
Attachment #220018 -
Attachment is obsolete: true
Attachment #224857 -
Flags: review?(roc)
Attachment #220018 -
Flags: superreview?(roc)
Attachment #220018 -
Flags: review?(caillon)
You need to call NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY after each successful GetChildList. Also, the GetChildList parameters should have a '.' after the preference so you don't match things like "intl.fontstuff".
Assignee | ||
Comment 7•18 years ago
|
||
Update the patch based on roc's comment. Two problems: 1. There are three chunk of similar code in the patch. Do I need to make a helper function to handle them? 2. I check the definition of nsPref::EnumerateChildren. It also calls GetChildList to get the array. If we add "." after the preferences, the meaning of the function will be changed I think.
Attachment #224857 -
Attachment is obsolete: true
Attachment #224985 -
Flags: review?(roc)
Attachment #224857 -
Flags: review?(roc)
(In reply to comment #7) > Two problems: > 1. There are three chunk of similar code in the patch. Do I need to make a > helper function to handle them? No, I'll let that go :-) > 2. I check the definition of nsPref::EnumerateChildren. It also calls > GetChildList to get the array. If we add "." after the preferences, the > meaning of the function will be changed I think. True. The old code was buggy. I think this is the right thing to do. + if (prefs->GetChildList("intl.font.", &count, &childArray)) { You should be calling NS_SUCCEEDED here, not just testing the result. Almost done now :-)
Assignee | ||
Comment 9•18 years ago
|
||
Updated patch.
Attachment #224985 -
Attachment is obsolete: true
Attachment #225256 -
Flags: review?(roc)
Attachment #224985 -
Flags: review?(roc)
Attachment #225256 -
Flags: superreview+
Attachment #225256 -
Flags: review?(roc)
Attachment #225256 -
Flags: review+
Comment 10•18 years ago
|
||
Checking in nsPrefMigration.cpp; /cvsroot/mozilla/profile/pref-migrator/src/nsPrefMigration.cpp,v <-- nsPrefMigration.cpp new revision: 1.206; previous revision: 1.205 done Checking in nsPrefMigration.h; /cvsroot/mozilla/profile/pref-migrator/src/nsPrefMigration.h,v <-- nsPrefMigration.h new revision: 1.54; previous revision: 1.53 done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This broke the Windows SeaMonkey build (which uses the old-style for loop scoping rules): http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey
Assignee | ||
Comment 12•18 years ago
|
||
Has been fixed by timeless. Thanks.
Comment 13•18 years ago
|
||
For future reference, see http://www.mozilla.org/hacking/portable-cpp.html#variables_in_for
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•