Closed Bug 1864985 Opened 2 years ago Closed 2 years ago

Add hasUserPass attribute to nsIURI

Categories

(Core :: Networking, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: daisuke, Assigned: daisuke)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

Looks like whatwg-urll.js on DevTools was introduced from https://github.com/jsdom/whatwg-url and it defined own URL. So, it seems that we don' have to change it.

We will remove the user and pass from the URL for Histories and Favicons using
nsIOService::CreateExposableURI()[1], then store them to the database. And, for
Favicons. And, for Favicons, we will also read them. Therefore, as the
frequency calling CreateExposableURI() will be higher, we want to optimize it.
Currently, CreateExposableURI() gets/copies the String of UserPass to check whether there is a user pass info in the URL[2]. Its copying will be waste. To
prevent it, implement hasUserPass in nsIURI, and refer to it instead.

[1] https://searchfox.org/mozilla-central/rev/90dce6b0223b4dc17bb10f1125b44f70951585f9/netwerk/base/nsIOService.cpp#1031
[2] https://searchfox.org/mozilla-central/rev/90dce6b0223b4dc17bb10f1125b44f70951585f9/netwerk/base/nsIOService.cpp#1017

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/10a60139ccb5 Add hasUserPass attribute to nsIURI r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/47a07f8f9794 Use nsIURI::hasUserPass instead of checking user pass string r=necko-reviewers,valentin
Blocks: 1865419
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
See Also: → 1865471
No longer blocks: 1865419
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: