Closed Bug 1910886 Opened 4 months ago Closed 3 months ago

Reduce duplicated code between CookieService and CookieServiceChild (nsICookieService.setCookieStringFromDocument/nsICookieService.getCookieStringFromDocument)

Categories

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

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(4 files)

I suggest moving the security checks in Document::GetCookie and Document::SetCookie.

Assignee: nobody → amarchesini
Status: NEW → ASSIGNED
Attachment #9417272 - Attachment description: Bug 1910886 - Reduce duplicated cookie between CookieService and CookieServiceChild - part 1 - Unify nsICookieService.getCookieStringFromDocument implementations, r?edgul → Bug 1910886 - Reduce duplicated code between CookieService and CookieServiceChild - part 1 - Unify nsICookieService.getCookieStringFromDocument implementations, r?edgul
Attachment #9417273 - Attachment description: Bug 1910886 - Reduce duplicated cookie between CookieService and CookieServiceChild - part 2 - Unify nsICookieService.setCookieStringFromDocument implementations, r?edgul → Bug 1910886 - Reduce duplicated code between CookieService and CookieServiceChild - part 2 - Unify nsICookieService.setCookieStringFromDocument implementations, r?edgul
Attachment #9417274 - Attachment description: Bug 1910886 - Reduce duplicated cookie between CookieService and CookieServiceChild - part 3 - Fix gtests, r?edgul → Bug 1910886 - Reduce duplicated code between CookieService and CookieServiceChild - part 3 - Fix gtests, r?edgul
Summary: Reduce duplicated cookie between CookieService and CookieServiceChild (nsICookieService.setCookieStringFromDocument/nsICookieService.getCookieStringFromDocument) → Reduce duplicated code between CookieService and CookieServiceChild (nsICookieService.setCookieStringFromDocument/nsICookieService.getCookieStringFromDocument)
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Duplicate of this bug: 1642581
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e5791012019f Reduce duplicated code between CookieService and CookieServiceChild - part 1 - Unify nsICookieService.getCookieStringFromDocument implementations, r=edgul,cookie-reviewers https://hg.mozilla.org/integration/autoland/rev/a851b9fcca9c Reduce duplicated code between CookieService and CookieServiceChild - part 2 - Unify nsICookieService.setCookieStringFromDocument implementations, r=edgul,cookie-reviewers https://hg.mozilla.org/integration/autoland/rev/8fe13ea22554 Reduce duplicated code between CookieService and CookieServiceChild - part 3 - Fix gtests, r=edgul

Backed out for causing mochitest failures on browser_storageAccessPrivilegeAPI.js

[task 2024-08-09T10:42:46.496Z] 10:42:46     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js | partitioned cookies should be available - true == true - 
[task 2024-08-09T10:42:46.497Z] 10:42:46     INFO - Buffered messages finished
[task 2024-08-09T10:42:46.501Z] 10:42:46     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js | Successfully set cookies. Both partitioned and unpartitioned cookies should be available - false == true - got false, expected true (operator ==)
[task 2024-08-09T10:42:46.501Z] 10:42:46     INFO - Stack trace:
[task 2024-08-09T10:42:46.502Z] 10:42:46     INFO - ok@resource://testing-common/SpecialPowersSandbox.sys.mjs:85:21
[task 2024-08-09T10:42:46.502Z] 10:42:46     INFO - msg@chrome://mochitests/content/browser/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js:47:15
[task 2024-08-09T10:42:46.503Z] 10:42:46     INFO - EventListener.handleEvent*@chrome://mochitests/content/browser/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js:39:17
[task 2024-08-09T10:42:46.503Z] 10:42:46     INFO - @chrome://mochitests/content/browser/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js:36:13
[task 2024-08-09T10:42:46.504Z] 10:42:46     INFO - execute@resource://testing-common/SpecialPowersSandbox.sys.mjs:139:12
[task 2024-08-09T10:42:46.504Z] 10:42:46     INFO - _spawnTask@resource://testing-common/SpecialPowersChild.sys.mjs:1615:15
[task 2024-08-09T10:42:46.504Z] 10:42:46     INFO - receiveMessage@resource://testing-common/SpecialPowersChild.sys.mjs:254:21
[task 2024-08-09T10:42:46.505Z] 10:42:46     INFO - JSActor query*receiveMessage@resource://testing-common/SpecialPowersParent.sys.mjs:1383:14
[task 2024-08-09T10:42:46.505Z] 10:42:46     INFO - JSActor query*spawn@resource://testing-common/SpecialPowersChild.sys.mjs:1544:17
[task 2024-08-09T10:42:46.506Z] 10:42:46     INFO - runScriptInSubFrame@chrome://mochitests/content/browser/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js:31:24
[task 2024-08-09T10:42:46.506Z] 10:42:46     INFO - test_privilege_api_with_dFPI@chrome://mochitests/content/browser/toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js:323:9
[task 2024-08-09T10:42:46.506Z] 10:42:46     INFO - async*handleTask@chrome://mochikit/content/browser-test.js:1145:26
[task 2024-08-09T10:42:46.506Z] 10:42:46     INFO - _runTaskBasedTest@chrome://mochikit/content/browser-test.js:1217:18
[task 2024-08-09T10:42:46.506Z] 10:42:46     INFO - async*Tester_execTest@chrome://mochikit/content/browser-test.js:1358:14
[task 2024-08-09T10:42:46.507Z] 10:42:46     INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1134:14
[task 2024-08-09T10:42:46.507Z] 10:42:46     INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13
[task 2024-08-09T10:42:46.507Z] 10:42:46     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "https://not-tracking.example.com/browser/toolkit/components/antitracking/test/browser/3rdParty.html" line: 0}]
[task 2024-08-09T10:42:46.507Z] 10:42:46     INFO - TEST-PASS | toolkit/components/antitracking/test/browser/browser_storageAccessPrivilegeAPI.js | Has storage access - true == true - 
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/900a517b1293 Reduce duplicated code between CookieService and CookieServiceChild - part 1 - Unify nsICookieService.getCookieStringFromDocument implementations, r=edgul,cookie-reviewers https://hg.mozilla.org/integration/autoland/rev/1a2d186afd52 Reduce duplicated code between CookieService and CookieServiceChild - part 2 - Unify nsICookieService.setCookieStringFromDocument implementations, r=edgul,cookie-reviewers https://hg.mozilla.org/integration/autoland/rev/86aaf1c42316 Reduce duplicated code between CookieService and CookieServiceChild - part 3 - Fix gtests, r=edgul https://hg.mozilla.org/integration/autoland/rev/282f95388928 Reduce duplicated code between CookieService and CookieServiceChild - part 4 - Fix broken tests, r=anti-tracking-reviewers,timhuang
Flags: needinfo?(amarchesini)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: