Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit e92fa08

Browse files
committed
Backed out 4 changesets (bug 1603969) for failing at /browser_startup_mainthreadio.js on a CLOSED TREE.
Backed out changeset 959f12e42db9 (bug 1603969) Backed out changeset 18bf461b9630 (bug 1603969) Backed out changeset 8c3bb23a048b (bug 1603969) Backed out changeset 450eec13d73e (bug 1603969)
1 parent da50d29 commit e92fa08

20 files changed

Lines changed: 161 additions & 378 deletions

browser/base/content/browser-siteProtections.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,10 @@ var ThirdPartyCookies = {
779779
for (let perm of Services.perms.getAllForPrincipal(
780780
gBrowser.contentPrincipal
781781
)) {
782-
if (perm.type == "3rdPartyStorage^" + origin) {
782+
if (
783+
perm.type == "3rdPartyStorage^" + origin ||
784+
perm.type.startsWith("3rdPartyStorage^" + origin + "^")
785+
) {
783786
return perm.capability;
784787
}
785788
}
@@ -796,7 +799,10 @@ var ThirdPartyCookies = {
796799
for (let perm of Services.perms.getAllForPrincipal(
797800
gBrowser.contentPrincipal
798801
)) {
799-
if (perm.type == "3rdPartyStorage^" + origin) {
802+
if (
803+
perm.type == "3rdPartyStorage^" + origin ||
804+
perm.type.startsWith("3rdPartyStorage^" + origin + "^")
805+
) {
800806
Services.perms.removePermission(perm);
801807
}
802808
}

browser/base/content/test/siteProtections/browser.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[DEFAULT]
22
support-files =
33
head.js
4-
!/browser/base/content/test/trackingUI/trackingPage.html
54

65
[browser_protections_UI.js]
76
fail-if = fission # Bug 1590696

browser/base/content/test/trackingUI/cookieServer.sjs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@
22
* http://creativecommons.org/publicdomain/zero/1.0/
33
*/
44

5-
// A 1x1 PNG image.
6-
// Source: https://commons.wikimedia.org/wiki/File:1x1.png (Public Domain)
7-
const IMAGE = atob("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAA" +
8-
"ACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=");
9-
105
function handleRequest(request, response) {
116
response.setStatusLine(request.httpVersion, 200);
12-
if (request.queryString &&
13-
request.queryString.includes("type=image-no-cookie")) {
14-
response.setHeader("Content-Type", "image/png", false);
15-
response.write(IMAGE);
16-
} else {
17-
response.setHeader("Set-Cookie", "foopy=1");
18-
response.write("cookie served");
19-
}
7+
response.setHeader("Set-Cookie", "foopy=1");
8+
response.write("cookie served");
209
}

browser/base/content/test/trackingUI/trackingAPI.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ function createIframe(src) {
44
document.body.appendChild(ifr);
55
}
66

7-
function createImage(src) {
8-
let img = document.createElement("img");
9-
img.src = src;
10-
img.onload = () => {
11-
parent.postMessage("done", "*");
12-
};
13-
document.body.appendChild(img);
14-
}
15-
167
onmessage = event => {
178
switch (event.data) {
189
case "tracking":
@@ -50,11 +41,6 @@ onmessage = event => {
5041
"https://test1.example.org/browser/browser/base/content/test/trackingUI/cookieServer.sjs"
5142
);
5243
break;
53-
case "image":
54-
createImage(
55-
"http://trackertest.org/browser/browser/base/content/test/trackingUI/cookieServer.sjs?type=image-no-cookie"
56-
);
57-
break;
5844
case "window-open":
5945
window.win = window.open(
6046
"http://trackertest.org/browser/browser/base/content/test/trackingUI/cookieServer.sjs",

dom/ipc/ContentParent.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5759,11 +5759,13 @@ mozilla::ipc::IPCResult ContentParent::RecvAutomaticStorageAccessCanBeGranted(
57595759
mozilla::ipc::IPCResult
57605760
ContentParent::RecvFirstPartyStorageAccessGrantedForOrigin(
57615761
const Principal& aParentPrincipal, const Principal& aTrackingPrincipal,
5762-
const nsCString& aTrackingOrigin, const int& aAllowMode,
5762+
const nsCString& aTrackingOrigin, const nsCString& aGrantedOrigin,
5763+
const int& aAllowMode,
57635764
FirstPartyStorageAccessGrantedForOriginResolver&& aResolver) {
57645765
AntiTrackingCommon::
57655766
SaveFirstPartyStorageAccessGrantedForOriginOnParentProcess(
5766-
aParentPrincipal, aTrackingPrincipal, aTrackingOrigin, aAllowMode)
5767+
aParentPrincipal, aTrackingPrincipal, aTrackingOrigin, aGrantedOrigin,
5768+
aAllowMode)
57675769
->Then(GetCurrentThreadSerialEventTarget(), __func__,
57685770
[aResolver = std::move(aResolver)](
57695771
AntiTrackingCommon::FirstPartyStorageAccessGrantPromise::

dom/ipc/ContentParent.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,8 @@ class ContentParent final
11931193

11941194
mozilla::ipc::IPCResult RecvFirstPartyStorageAccessGrantedForOrigin(
11951195
const Principal& aParentPrincipal, const Principal& aTrackingPrincipal,
1196-
const nsCString& aTrackingOrigin, const int& aAllowMode,
1196+
const nsCString& aTrackingOrigin, const nsCString& aGrantedOrigin,
1197+
const int& aAllowMode,
11971198
FirstPartyStorageAccessGrantedForOriginResolver&& aResolver);
11981199

11991200
mozilla::ipc::IPCResult RecvStoreUserInteractionAsPermission(

dom/ipc/PContent.ipdl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,7 @@ parent:
14811481
async FirstPartyStorageAccessGrantedForOrigin(Principal aParentPrincipal,
14821482
Principal aTrackingPrincipal,
14831483
nsCString aTrackingOrigin,
1484+
nsCString aGrantedOrigin,
14841485
int aAllowMode)
14851486
returns (bool unused);
14861487

extensions/permissions/nsPermissionManager.cpp

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ void nsPermissionManager::Startup() {
882882
// nsPermissionManager Implementation
883883

884884
#define PERMISSIONS_FILE_NAME "permissions.sqlite"
885-
#define HOSTS_SCHEMA_VERSION 11
885+
#define HOSTS_SCHEMA_VERSION 10
886886

887887
// Default permissions are read from a URL - this is the preference we read
888888
// to find that URL. If not set, don't use any default permissions.
@@ -1539,25 +1539,6 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
15391539
MOZ_FALLTHROUGH;
15401540

15411541
case 9: {
1542-
rv = mDBConn->SetSchemaVersion(10);
1543-
NS_ENSURE_SUCCESS(rv, rv);
1544-
}
1545-
1546-
// fall through to the next upgrade
1547-
MOZ_FALLTHROUGH;
1548-
1549-
case 10: {
1550-
// Filter out the rows with storage access API permissions with a
1551-
// granted origin, and remove the granted origin part from the
1552-
// permission type.
1553-
rv = mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
1554-
"UPDATE moz_perms "
1555-
"SET type=SUBSTR(type, 0, INSTR(SUBSTR(type, INSTR(type, '^') + "
1556-
"1), '^') + INSTR(type, '^')) "
1557-
"WHERE INSTR(SUBSTR(type, INSTR(type, '^') + 1), '^') AND "
1558-
"SUBSTR(type, 0, 18) == \"storageAccessAPI^\";"));
1559-
NS_ENSURE_SUCCESS(rv, rv);
1560-
15611542
rv = mDBConn->SetSchemaVersion(HOSTS_SCHEMA_VERSION);
15621543
NS_ENSURE_SUCCESS(rv, rv);
15631544
}

extensions/permissions/test/unit/test_permmanager_load_invalid_entries.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ function run_test() {
223223
// Initialize the permission manager service
224224
var pm = Services.perms;
225225

226-
// The schema should be upgraded to 11, and a 'modificationTime' column should
226+
// The schema should be upgraded to 10, and a 'modificationTime' column should
227227
// exist with all records having a value of 0.
228-
Assert.equal(connection.schemaVersion, 11);
228+
Assert.equal(connection.schemaVersion, 10);
229229

230230
let select = connection.createStatement(
231231
"SELECT modificationTime FROM moz_perms"

extensions/permissions/test/unit/test_permmanager_migrate_10-11.js

Lines changed: 0 additions & 193 deletions
This file was deleted.

0 commit comments

Comments
 (0)