Open Bug 1965087 Opened 1 year ago Updated 1 month ago

Fix creationDate and lastAccessed cookie initialization on session restore

Categories

(Core :: Networking: Cookies, defect, P2)

defect
Points:
3

Tracking

()

People

(Reporter: edgul, Assigned: valentin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged][necko-priority-queue])

Attachments

(3 files)

As noted in Bug 1932650 Comment 12, cookie creationDate and lastAccessed fields are not correctly preserved on session restore.

Likely we will need to extend the Add() api to support the session restore code.

Blocks: 1932650
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Whiteboard: [necko-triaged] → [necko-triaged][necko-priority-next]
Points: --- → 3
Rank: 1

If we want to extend the Add() method, this task is not so easy. That method has 13 params (including the ret value) and 14 is the max we allow. See PARAM_BUFFER_COUNT.

The alternative is to use an interface for the parameters or to use webIDL bindings and a JSVal.

Whiteboard: [necko-triaged][necko-priority-next] → [necko-triaged][necko-priority-queue]

We would like to expand the parameter count of the CookieManager's Add() function, however we are already at the upper limit of parameters for XPCOM interfaces. This ChromeWebIdl interface will simplify the callers of this API from JS and C++ at the same time as reducing the parameter count to something more reasonable.

Assignee: nobody → edgul
Attachment #9511208 - Attachment description: WIP: Bug 1965087 - Added CookieAdder ChromeWebIdl interface for adding cookies. → WIP: Bug 1965087 - Added CookieAddStruct ChromeWebIdl interface for adding cookies.
Attachment #9515521 - Attachment description: WIP: Bug 1965087 - Use CookieManager::AddStruct instead of Add() → Bug 1965087 - Use CookieManager::AddStruct instead of Add()
Attachment #9515521 - Attachment description: Bug 1965087 - Use CookieManager::AddStruct instead of Add() → WIP: Bug 1965087 - Use CookieManager::AddStruct instead of Add()

Just a quick update for anyone following this.

The refactor aspect of this is close to done. Just need to wrap up some breakage in CI and then probably revert the naming of the new API back to Add(). All progress so far is in the above patches.

After that we can actually solve the last accessed problem

Haven't had time to work on this in a while.
The patches have bit-rotted a bit, but a lot should still be useful.
If someone wants to handle commandeer to get this done faster, they are welcome.

Assignee: edgul → valentin.gosu
Duplicate of this bug: 1631408
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: