User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030401 Build Identifier: There are a few constant strings in embedding/components/windowwatcher that can be changed from pointers to char arrays to save on footprint. Reproducible: Always Steps to Reproduce:
Created attachment 119976 [details] [diff] [review] Makes constant strings character arrays rather than pointers This patch makes the constant strings character arrays, saving a whole 32 bytes of .data. It also gets rid of 5 relocations.
Comment on attachment 119976 [details] [diff] [review] Makes constant strings character arrays rather than pointers more great cleanup! sr=alecf
Attachment #119976 - Flags: superreview+
this is your bug now :) (I'm confirming your bugzilla account so you can do this yourself..)
Assignee: adamlock → ataylor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 119976 [details] [diff] [review] Makes constant strings character arrays rather than pointers r=adamlock Do we have a doc somewhere which talks about this issue? I'm just curious since I tend to use char * consts when it seems to be a bad thing.
Attachment #119976 - Flags: review+
adam: I posted to netscape.public.mozilla.performance about this.. as a general rule you should use const char foo = "..."; rather than const char*
Patch checked in, per Andrew's request. If there is nothing else remaining to do, please mark fixed.
This is checked in so I'm marking it as fixed.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Verified in code
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.