Closed
Bug 204532
Opened 22 years ago
Closed 22 years ago
more data could be const in content
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: ataylor, Assigned: ataylor)
References
Details
(Keywords: memory-footprint)
Attachments
(1 file, 1 obsolete file)
20.72 KB,
patch
|
bzbarsky
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
There are a number of variables in mozilla/content that could be made const.
Making them const allows some optimizations not otherwise available, such as
sharing more data between multiple running instances.
Assignee | ||
Comment 1•22 years ago
|
||
Here is a patch that constifies some variables in content.
![]() |
||
Comment 2•22 years ago
|
||
> -static char* kNullPointer = "null pointer";
> +static const char kNullPointer[] = "null pointer";
How about just copying this string to the one place where it's used (in an
NS_PRECONDITION) and eliminating the symbol entirely? So that should read:
NS_PRECONDITION(aInput, "Null input stream pointer");
instead of
NS_PRECONDITION(nsnull != aInput, kNullPointer);
Comment 3•22 years ago
|
||
Comment on attachment 122522 [details] [diff] [review]
constifies some variables in content
nice!
sr=alecf
Attachment #122522 -
Flags: superreview+
Assignee | ||
Comment 4•22 years ago
|
||
Here is a new patch that implements Boris' suggestion.
Attachment #122522 -
Attachment is obsolete: true
![]() |
||
Comment 5•22 years ago
|
||
Comment on attachment 122589 [details] [diff] [review]
constifies some variables in content - v2
r=me; please poke me when this gets approval (if you decide to ask for it) or
the tree reopens for 1.5a.
Attachment #122589 -
Flags: review+
Comment 6•22 years ago
|
||
Comment on attachment 122589 [details] [diff] [review]
constifies some variables in content - v2
sr=alecf
yeah, lets wait on 1.5alpha for this.. I had an ugly landing of some
constifying at one point.
Attachment #122589 -
Flags: superreview+
![]() |
||
Comment 7•22 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
Updated•7 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•