Closed
Bug 309927
Opened 19 years ago
Closed 19 years ago
avoid nsIStyledContent QI in RuleProcessorData
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
(Keywords: perf)
Attachments
(1 file)
|
1.04 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
We can save on the cost of AddRef and Release by using IsContentOfType instead of QI'ing to nsIStyledContent. nsIStyledContent is implemented only by content of type ELEMENT, so if that succeeds, we can just cast. Speeds up RuleProcessorData ctor by about 8% according to quantify.
| Assignee | ||
Comment 1•19 years ago
|
||
Attachment #197302 -
Flags: superreview?(dbaron)
Attachment #197302 -
Flags: review?(dbaron)
Comment on attachment 197302 [details] [diff] [review] patch r+sr=dbaron if you add an assertion in the constructor, outside the if, that nsCOMPtr<nsIStyledContent>(do_QueryInterface(aContent)) == mStyledContent.
Attachment #197302 -
Flags: superreview?(dbaron)
Attachment #197302 -
Flags: superreview+
Attachment #197302 -
Flags: review?(dbaron)
Attachment #197302 -
Flags: review+
| Assignee | ||
Comment 3•19 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•