Comment 37 for bug 23369

Revision history for this message
In , alecf (alecf) wrote :

You don't have to worry about getting garbage in... HOWEVER you've got one thing
a little mixed up! the topic ona pref change will ALWAYS be
NS_PREFBRANCH_PREFCHANGE_TOPIC_ID - so thats what you can use to verify that
you're getting a prefchanged notification, and that guarantees that the pref in
question is one you've requested observation on.

as for the two lists.. first of all you need to document that very heavily. you
need to explain what it means to be 'kept in sync' - you should also refer to
the gconf list, and explain the difference between the two.

In fact, you need to go through this whole patch and add comments all over the
place.. this code needs to be very heavily documented. Thanks.

also here:
+ nsresult GetAtomForMozKey(const char *aMozKey, PRUint32 *aAtom) \
+ {return GetAtom(aMozKey, 0, aAtom); }
+ const char *GetMozKey(PRUint32 aAtom) \
+ {return GetKey(aAtom, 0); }

you don't need the "\" at the end of the line - this isn't a macro, and the \
will confuse editors like emacs.