Closed
Bug 66865
Opened 24 years ago
Closed 24 years ago
Duplicate code in nsComponentManager
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla0.8
People
(Reporter: bratell, Assigned: scc)
Details
There seems to be some extra code lines in nsComponentManager.cpp that costs 4
microseconds at startup (tripped over it while playing with Quantify). :-)
The patch is below:
diff -u -r1.141 nsComponentManager.cpp
--- nsComponentManager.cpp 2001/01/27 22:50:24 1.141
+++ nsComponentManager.cpp 2001/01/28 14:51:36
@@ -816,7 +816,6 @@
nsCOMPtr<nsIRegistryEnumerator> regEnum = do_QueryInterface(cidEnum, &rv);
if (NS_FAILED(rv)) return rv;
- rv = regEnum->First();
for (rv = regEnum->First();
NS_SUCCEEDED(rv) && (regEnum->IsDone() != NS_OK);
rv = regEnum->Next())
@@ -868,7 +867,6 @@
regEnum = do_QueryInterface(contractidEnum, &rv);
if (NS_FAILED(rv)) return rv;
- rv = regEnum->First();
for (rv = regEnum->First();
NS_SUCCEEDED(rv) && (regEnum->IsDone() != NS_OK);
rv = regEnum->Next())
I can check it in if I get a review.
Comment 1•24 years ago
|
||
nsCOMPtr<nsIRegistryEnumerator> regEnum = do_QueryInterface(cidEnum, &rv);
While you're in there you might want to turn that line into:
nsCOMPtr<nsIRegistryEnumerator> regEnum(do_QueryInterface(cidEnum, &rv));
which avoids creating a temp. copy for some compilers.
r=jag on the patch you have here though.
| Assignee | ||
Comment 2•24 years ago
|
||
Has this patch been checked in? If not, I'll get it in as soon as possible.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.8
Comment 3•24 years ago
|
||
sr=scc?
| Reporter | ||
Comment 4•24 years ago
|
||
I was waiting for the sr from jband, but if you take the sr, and want to check
it in, it's fine with me.
| Assignee | ||
Comment 5•24 years ago
|
||
sr=scc, yes. I'll check it in if no one else with access plans a checkin in the
near future.
Comment 6•24 years ago
|
||
I'll check this in (if blake doesn't beat me to it)
Comment 7•24 years ago
|
||
Or Daniel for that matter :-) Sorry, missed your comment there. Wanna check this
in?
| Reporter | ||
Comment 8•24 years ago
|
||
Be my guest(s). That way I can go to sleep and won't have to wait for the tree
to be green. :-)
But, if haven't done it by the morning... :-)
Comment 10•24 years ago
|
||
(checked in the QI change..)
Reopening, something happened to the resolution.
Status: RESOLVED → REOPENED
Comment 11•24 years ago
|
||
Fixed.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•