Closed Bug 1256251 Opened 6 years ago Closed 6 years ago
.cookies .on Changed to match Chrome's behaviour when overwriting a cookie
MozReview Request: Bug 1256251 - Update browser.cookies.onChanged to match Chrome's behaviour when overwriting a cookie, r?kmag
58 bytes, text/x-review-board-request
As per the docs : `As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with "cause" of "overwrite" . Afterwards, a new cookie is written with the updated values, generating a second notification with "cause" "explicit".` However, we do not currently do this with the API. We fire an event with removed: "false" and cause: "overwrite", which does not match the above behaviour. This bug to to change that so that when we receive notification that a cookie has been updated we fire both of the above-mentioned events, rather than the single event that we currently fire. Kris/Andy, do you agree that we should make this change?  https://developer.chrome.com/extensions/cookies#event-onChanged
Iteration: --- → 48.1 - Mar 21
As long as we don't inherit a huge technical debt (its a few lines of code) then lets copy Chrome.
Review commit: https://reviewboard.mozilla.org/r/39701/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/39701/
Attachment #8730147 - Flags: review?(kmaglione+bmo)
Note that I did check Chrome and confirmed that the documented behaviour matches the actual behaviour.
Comment on attachment 8730147 [details] MozReview Request: Bug 1256251 - Update browser.cookies.onChanged to match Chrome's behaviour when overwriting a cookie, r?kmag https://reviewboard.mozilla.org/r/39701/#review36351 Hm. This is a strange API...
Attachment #8730147 - Flags: review?(kmaglione+bmo) → review+
Assignee: nobody → bob.silverberg
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.