Closed
Bug 1375698
Opened 9 years ago
Closed 9 years ago
Cleanup nsDocument::GetBoxObjectFor
Categories
(Core :: XUL, enhancement, P3)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
Attachments
(2 files)
|
3.69 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
|
4.89 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
We can replace do_CreateInstance(contractID) with "new BoxObject",
remove unnecessary error handling since "new" is infallible.
Also, use RefPtr<BoxObject> for the mBoxObjectTable hashtable because
that's what's stored there, not some abstract nsPIBoxObject.
| Assignee | ||
Comment 1•9 years ago
|
||
Using #ifdef MOZ_XUL mostly as "this can be removed some day".
I doubt our code actually builds without it currently.
Attachment #8880633 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 2•9 years ago
|
||
(Bug 1375696 will cleanup the unnecessary hashtable lookups here)
Attachment #8880634 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment on attachment 8880633 [details] [diff] [review]
part 1 - Call "new BoxObject" instead of do_CreateInstance(contractID) and remove some unnecessary error handling since "new" is infallible
r=me. Thank you for doing this.
We might want a followup to get rid of all this contractid/CID/NS_New* gunk for box objects, after 57 ships.
Attachment #8880633 -
Flags: review?(bzbarsky) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8880634 [details] [diff] [review]
part 2 - Make mBoxObjectTable a nsRefPtrHashtable of BoxObject instead of nsInterfaceHashtable of nsPIBoxObject (that we then need to downcast)
r=me
Attachment #8880634 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Boris Zbarsky [:bz] (if a patch has no decent message, automatic r-) from comment #4)
> We might want a followup to get rid of all this contractid/CID/NS_New* gunk
> for box objects, after 57 ships.
Filed bug 1376125.
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9213679fdcf
part 1 - Call "new BoxObject" instead of do_CreateInstance(contractID) and remove some unnecessary error handling since "new" is infallible. r=bz
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9f4980873ab
part 2 - Make mBoxObjectTable a nsRefPtrHashtable of BoxObject instead of nsInterfaceHashtable of nsPIBoxObject (that we then need to downcast). r=bz
Comment 8•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c9213679fdcf
https://hg.mozilla.org/mozilla-central/rev/c9f4980873ab
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•