Closed Bug 411952 Opened 17 years ago Closed 16 years ago

Cookie's creationTime needs to be exposed via nsICookie2

Categories

(Core :: Networking: Cookies, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Spinoff from bug 248970 comment 45. The creationTime field of the cookies' DB should be exposed from the nsICookie2 interface. Throwing this off to Dan, as he volunteered for it. :-) Thanks, Dan!
Dan: do you think you would be able to submit a patch in the next couple of days? If not, would you mind giving a few pointers so that I can come up with a patch myself? I'll need this in bug 248970...
Based on bug 248970 comment 70, this should no longer be a blocker for that bug...
No longer blocks: PrivateBrowsing
Target Milestone: mozilla1.9 M11 → ---
Attached patch PatchSplinter Review
The patch includes a unit test, which allows the creationTime attribute to slip by 1 second maximum, to skip timing issues when running the test.
Assignee: dwitte → ehsan.akhgari
Attachment #339573 - Flags: superreview?(bzbarsky)
Attachment #339573 - Flags: review?(dwitte)
Attachment #339573 - Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 339573 [details] [diff] [review] Patch Should perhaps be |long long| in the IDL.
(In reply to comment #4) > (From update of attachment 339573 [details] [diff] [review]) > Should perhaps be |long long| in the IDL. I noted that the expiry attribute was declared as PRInt64, so I thought creationTime should be as well...
bz: ping?
Blocks: 453440
Ah, yeah, keeping those consistent is a good idea. In the end it really doesn't matter much: the two get folded to the same thing by everyone.
bz: thanks for your comments! Actually, I thought this patch has dwitte's r+ and is awaiting your sr... :/ So, I guess what I really meant was: dwitte: ping? :-)
Comment on attachment 339573 [details] [diff] [review] Patch Throwing this to mconnor...
Attachment #339573 - Flags: review?(dwitte) → review?(mconnor)
Attachment #339573 - Flags: review?(mconnor) → review+
Comment on attachment 339573 [details] [diff] [review] Patch r=mconnor, because dwitte seems to have wandered away somewhere.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
Err, I forget to hg addremove *all the time*! <http://hg.mozilla.org/mozilla-central/rev/75036e89468d>
So, the idl for this says it is in seconds, but the patch clearly calls CreationID, which returns microseconds. The idl needs to be corrected (or the code does).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
fix the idl comment, please.
IDL comment fixed. Thanks for catching this, Shawn! <http://hg.mozilla.org/mozilla-central/rev/47dd67ed93a4>
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Keywords: dev-doc-needed
Resolution: --- → FIXED
OK, I went ahead and documented this: <https://developer.mozilla.org/en/nsICookie2> The documentation was mistakenly telling that nsICookie2 is frozen, and I corrected it as well. Also, added a note on <https://developer.mozilla.org/en/Firefox_3.1_for_developers#For_XUL_and_application_developers>
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: