Closed
Bug 1419780
Opened 7 years ago
Closed 7 years ago
nsIconProtocolHandler parses a URI twice unnecessarily
Categories
(Core :: Graphics: ImageLib, enhancement)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: valentin, Assigned: valentin)
References
Details
Attachments
(1 file)
https://searchfox.org/mozilla-central/rev/797c93d81fe446f78babf20894f0729f15f71ee6/image/decoders/icon/nsIconProtocolHandler.cpp#71,74,80-81
There is no need to call SetSpec twice. It is better to make nsMozIconURI conditionally implement nsINestedURI.
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Attachment #8930955 -
Flags: review?(tnikkel)
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8930955 [details]
Bug 1419780 - nsIconProtocolHandler parses a URI twice unnecessarily
https://reviewboard.mozilla.org/r/202040/#review207528
While this looks OK to me, I'm not a peer for image/decoders/ stuff, and this style of XPCOM/C++ change is also not my forte, so it'd be good if :tn or someone else more familiar with this code could also review it.
Attachment #8930955 -
Flags: review?(gijskruitbosch+bugs) → review+
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8930955 [details]
Bug 1419780 - nsIconProtocolHandler parses a URI twice unnecessarily
https://reviewboard.mozilla.org/r/202040/#review207632
::: image/decoders/icon/nsIconURI.cpp:753
(Diff revision 1)
> if (iconURL) {
> iconURL.forget(aURI);
> } else {
> *aURI = nullptr;
> }
> return NS_OK;
According to the nsINestedURI header if we return null then we shouldn't return success. We probably don't ever hit that case though because QIing to nsINestedURI is conditional on mIconURL.
Attachment #8930955 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #3)
> Comment on attachment 8930955 [details]
> According to the nsINestedURI header if we return null then we shouldn't
> return success. We probably don't ever hit that case though because QIing to
> nsINestedURI is conditional on mIconURL.
Good point. Thanks for the review.
Comment hidden (mozreview-request) |
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c18f19fe1788
nsIconProtocolHandler parses a URI twice unnecessarily r=Gijs,tnikkel
Comment 7•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•