footprint improvments in embedding/components/windowwatcher

VERIFIED FIXED

Status

()

Core
Embedding: APIs
--
trivial
VERIFIED FIXED
15 years ago
15 years ago

People

(Reporter: Andrew Taylor, Assigned: Andrew Taylor)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

15 years ago
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:
(Assignee)

Comment 1

15 years ago
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 2

15 years ago
Comment on attachment 119976 [details] [diff] [review]
Makes constant strings character arrays rather than pointers

more great cleanup! sr=alecf
Attachment #119976 - Flags: superreview+

Comment 3

15 years ago
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 4

15 years ago
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+

Comment 5

15 years ago
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.
(Assignee)

Comment 7

15 years ago
This is checked in so I'm marking it as fixed.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 8

15 years ago
Verified in code
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.