Closed
Bug 1347639
Opened 8 years ago
Closed 8 years ago
nsImageLoadingContent::UpdateImageState shouldn't do useless QIs
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: smaug, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
|
10.33 KB,
patch
|
qdot
:
review+
|
Details | Diff | Splinter Review |
There really should be better ways to access nsIContent* than
http://searchfox.org/mozilla-central/rev/ca7015fa45b30b29176fbaa70ba0a36fe9263c38/dom/base/nsImageLoadingContent.cpp#1026
| Assignee | ||
Comment 1•8 years ago
|
||
Obvious options are:
1) A virtual IsContent() that subclasses override.
2) An nsIContent* ctor arg subclasses pass in and we store, at the cost of an extra word of memory.
Updated•8 years ago
|
Whiteboard: [qf-]
| Assignee | ||
Comment 2•8 years ago
|
||
MozReview-Commit-ID: 9sE3pbHwYbV
Attachment #8847959 -
Flags: review?(kyle)
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 3•8 years ago
|
||
Comment on attachment 8847959 [details] [diff] [review]
Add nsImageLoadingContent::AsContent to make getting the relevant nsIContent* faster
Review of attachment 8847959 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/html/HTMLObjectElement.h
@@ +253,5 @@
> void StartObjectLoad(bool aNotify, bool aForceLoad);
>
> +protected:
> + // Override for nsImageLoadingContent.
> + nsIContent* AsContent() override { return this; }
Nit: trailing whitespace, here and a few other headers
Attachment #8847959 -
Flags: review?(kyle) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc19d7604b6e
Add nsImageLoadingContent::AsContent to make getting the relevant nsIContent* faster. r=qdot
Comment 5•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Performance Impact: --- → -
Whiteboard: [qf-]
You need to log in
before you can comment on or make changes to this bug.
Description
•