Closed
Bug 1448330
Opened 7 years ago
Closed 6 years ago
Make nsIURI.clone a private method
Categories
(Core :: Networking, enhancement, P3)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla62
People
(Reporter: valentin, Assigned: valentin)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
Since we don't need to clone URIs to prevent them from being changed, the clone method is a bit redundant. It should only be used by the mutators, so I propose that we make it private, and remove all other calls presently in the code.
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8985327 [details]
Bug 1448330 - Make nsIURI.clone a private method
https://reviewboard.mozilla.org/r/250944/#review258042
Attachment #8985327 -
Flags: review?(honzab.moz) → review+
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/110e4b10e2ea
Make nsIURI.clone a private method r=mayhemer
Comment 4•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Comment 5•6 years ago
|
||
That busted TB a bit :-( - What about cloneIgnoringRef() and cloneWithNewRef()?
Comment 6•6 years ago
|
||
Stuff like:
mailnews/addrbook/src/nsAddbookUrl.cpp
194 rv = m_baseURL->Clone(getter_AddRefs(clone->m_baseURL));
mailnews/compose/src/nsSmtpUrl.cpp
536 rv = m_baseURL->Clone(getter_AddRefs(clone->m_baseURL));
becomes impossible since the base URL doesn't offer the method any more :-(
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #5)
> That busted TB a bit :-( - What about cloneIgnoringRef() and
> cloneWithNewRef()?
I'll remove them in a followup.
(In reply to Jorg K (GMT+2) from comment #6)
> Stuff like:
> mailnews/addrbook/src/nsAddbookUrl.cpp
> 194 rv = m_baseURL->Clone(getter_AddRefs(clone->m_baseURL));
> mailnews/compose/src/nsSmtpUrl.cpp
> 536 rv = m_baseURL->Clone(getter_AddRefs(clone->m_baseURL));
> becomes impossible since the base URL doesn't offer the method any more :-(
Cloning is unnecessary now (assuming nsIURI implementations are threadsafe/immutable) and you just need to copy the RefPtr.
Otherwise, mutate + finalize achieves the same as clone (as you already noticed in bug 1470046)
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•