Closed Bug 1958875 Opened 1 year ago Closed 1 year ago

Re-enable CookieStore API

Categories

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

task

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
relnote-firefox --- 140+
firefox140 --- fixed

People

(Reporter: edgul, Assigned: baku)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, webcompat:platform-bug, Whiteboard: [necko-triaged])

Attachments

(1 file)

The CookieStore API was disabled temporarily.
This bug will re-enable it.

Blocks: cookie-store
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
See Also: → 1959181
Assignee: nobody → amarchesini
Duplicate of this bug: 1959181
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7aeb1bd11e48 Re-enable CookieStore API, r=edgul,webidl,smaug,valentin

Backed out for causing mochitest failures in /test_interfaces_secureContext.html

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_interfaces_secureContext.html | If this is failing: DANGER, are you sure you want to expose the new interface CookieStoreManager to all webpages as a property on 'window'? Do not make a change to this file without a review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals)
Flags: needinfo?(amarchesini)
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f781ab633afe Re-enable CookieStore API, r=edgul,webidl,smaug,valentin
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch

:baku want to add a release note back for this?

This was the wording used when it was added to the Fx136 release notes before it was later disabled.

Added support for the CookieStore API, an asynchronous cookie API for scripts running in HTML documents and service workers.

Are any changes needed to the wording?

Flags: needinfo?(amarchesini)
See Also: → 1953368

I'd say the wording should now be something like "The CookieStore API got re-enabled. It provides methods for getting and setting cookies asynchronously from either a page or a service worker." (reflecting the wording on MDN).

I am also wondering whether it is worth mentioning that circumstance in the browser compat data, as well, meaning it was enabled in 136.0, then disabled in 136.0.2 and got re-enabled now for 140. Hamish, what do you think?

Sebastian

Flags: needinfo?(hamishwillee)

The wording is fine. Thanks.

Flags: needinfo?(amarchesini)

FWIW Donal wording is great. There is no need to mention the re-enabling because this history is not visible/relevant to external developers (exposed and undone in same release)

Flags: needinfo?(hamishwillee)

Thanks, added to the Fx140 nightly release notes, please allow 30 minutes for the site to update.
Keeping the relnote-firefox flag as ? to keep it on the radar for inclusion in the final Fx140 release notes.

relnote-firefox: --- → ?

FF140 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/39612

QA Whiteboard: [qa-triage-done-c141/b140]

OK, just found out from the compat data that this also supports:

Added in https://bugzilla.mozilla.org/show_bug.cgi?id=1947894 which was not tagged as needing docs (though they seem OK anyway)

  1. Did anything else major change in the API from when it was implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1475599

    For example, when we did docs for that issue, it was stated that Firefox has chosen to only return name and value from get and in change events. Is this still the case?

  2. Docs for ExtendableCookieChangeEvent indicate that this event is fired with type = changed for new cookies that are not immediately deleted, and with type = deleted for cookies that are deleted. There is also a note:

    A cookie that is replaced due to the insertion of another cookie with the same name, domain, and path, is ignored and does not trigger a change event.

    Is that all correct? I.e. a new cookie is referred to as "changed" but you can't actually change a cookie - if you do so you are replacing it, and so the event is not fired?

Flags: needinfo?(amarchesini)

All looks right except the 'partitioned' property. That is not part of the spec.

  1. Did anything else major change in the API from when it was implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1475599

No. We just included the SW support (bug 1947894). The documentation is correct.

For example, when we did docs for that issue, it was stated that Firefox has chosen to only return name and value from get and in change events. Is this still the case?

Yes it is.

A cookie that is replaced due to the insertion of another cookie with the same name, domain, and path, is ignored and does not trigger a change event.

No. This is false. Any cookie change generates an event. This line needs to be updated.

Flags: needinfo?(amarchesini)

I've marked this as complete because I've finished most of the work (waiting for reviews).

ExtendableCookieChangeEvent
All looks right except the 'partitioned' property. That is not part of the spec.

According to the linked spec the thing that has the properties is a CookieListItem, and in that partitioned does appear.
It is according to the linked spec: https://wicg.github.io/cookie-store/#dictdef-cookielistitem

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: