Closed Bug 1431924 Opened 7 years ago Closed 7 years ago

URLParams::ParseInput is pointlessly called in PageThumbsProtocol::ParseProtocolURL

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

59 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: nox, Assigned: nox)

References

Details

Attachments

(1 file)

The PageThumbsProtocol::ParseProtocolURL method just extracts a single "url" parameter from the URL's query string. There is no need to build a temporary `URLParams` value for that.
Priority: -- → P2
Comment on attachment 8944165 [details] Bug 1431924 - Do not use URLParams::ParseInput in PageThumbsProtocol::ParseProtocolURL; https://reviewboard.mozilla.org/r/214458/#review220746 r=me with the added documentation. ::: dom/url/URLSearchParams.h:56 (Diff revision 1) > }; > > static bool > Parse(const nsACString& aInput, ForEachIterator& aIterator); > > + static bool This needs documentation, both for the return value and for the behavior of aValue if the param is not found. Also needs to document what happen if aInput has the param named aName multiple times. ::: dom/url/URLSearchParams.cpp:241 (Diff revision 1) > + const nsAString* mName; > + nsAString* mValue; Is there a reason to use pointers, not references, here? Using references would legt you use == and = instead of Equals() and Assign()...
Comment on attachment 8944165 [details] Bug 1431924 - Do not use URLParams::ParseInput in PageThumbsProtocol::ParseProtocolURL; https://reviewboard.mozilla.org/r/214458/#review220748
Attachment #8944165 - Flags: review?(bzbarsky) → review+
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/1caea602dadb Do not use URLParams::ParseInput in PageThumbsProtocol::ParseProtocolURL; r=bz
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: