Fix creationDate and lastAccessed cookie initialization on session restore
Categories
(Core :: Networking: Cookies, defect, P2)
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.
Updated•11 months ago
|
Comment 1•11 months ago
|
||
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.
Updated•10 months ago
|
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.
Updated•10 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
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
- extend AddCookieStruct with creation and lastAccessed fields
- add jscookie.created and lastAccessed to https://searchfox.org/firefox-main/source/browser/components/sessionstore/SessionCookies.sys.mjs#242-281
- add on restore here: https://searchfox.org/firefox-main/source/browser/components/sessionstore/SessionCookies.sys.mjs#74-90
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 | ||
Updated•4 months ago
|
Description
•