Closed
Bug 549536
Opened 15 years ago
Closed 15 years ago
nsPrivateBrowsingService.js should use nsICookieManager2.getCookiesFromHost
Categories
(Firefox :: Private Browsing, defect)
Firefox
Private Browsing
Tracking
()
RESOLVED
FIXED
Firefox 3.7a4
People
(Reporter: dwitte, Assigned: ehsan.akhgari)
Details
(Keywords: perf)
Attachments
(1 file)
1.34 KB,
patch
|
dwitte
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/browser/components/privatebrowsing/src/nsPrivateBrowsingService.js#583
Using nsICookieManager.enumerator means iterating over all cookies, of which there will be thousands. This is slow -- much better to just do
cm.getCookiesFromHost(aDomain);
and then the guard on 'hasRootDomain' isn't required, either.
Reporter | ||
Updated•15 years ago
|
Whiteboard: goodfirstbug → [good first bug]
Assignee | ||
Comment 1•15 years ago
|
||
So, does GetCookiesFromHost expose the exact same behavior as what we achieve using hasRootDomain? (i.e., we want clearing cookies for mozilla.org also clear all cookies for xyz.mozilla.org, abc.xyz.mozilla.org, etc. as well).
Reporter | ||
Comment 2•15 years ago
|
||
Yes. :)
Assignee | ||
Comment 3•15 years ago
|
||
One more question, should we pass a preceding dot with the domain name to GetCookiesFromHost?
Reporter | ||
Comment 4•15 years ago
|
||
It doesn't matter, but let's say no.
Assignee | ||
Comment 5•15 years ago
|
||
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Attachment #432683 -
Flags: review?(vladimir)
Assignee | ||
Comment 6•15 years ago
|
||
This _was_ a good first bug, but since it would potentially lead to perf wins, I decided to pick it up myself. :-)
Whiteboard: [good first bug]
Reporter | ||
Comment 7•15 years ago
|
||
Comment on attachment 432683 [details] [diff] [review]
Patch (v1)
r=dwitte -- I assume that's OK, given that I wrote the API. :)
Attachment #432683 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 8•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a4
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•