Skip to content

Commit 9d049ad

Browse files
committed
Backed out changeset 93efae7712c8 (bug 1748138) for causing bc failures at browser_devices_get_user_media_in_xorigin_frame.js
1 parent 1468978 commit 9d049ad

File tree

3 files changed

+5
-57
lines changed

3 files changed

+5
-57
lines changed

browser/actors/PageInfoChild.sys.mjs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,11 @@ export class PageInfoChild extends JSWindowActorChild {
3030
mediaItems: await this.getDocumentMedia(document),
3131
});
3232
}
33-
case "PageInfo:getPartitionKey": {
34-
return Promise.resolve({
35-
partitionKey: await this.getPartitionKey(document),
36-
});
37-
}
3833
}
3934

4035
return undefined;
4136
}
4237

43-
getPartitionKey(document) {
44-
let partitionKey = document.cookieJarSettings.partitionKey;
45-
return partitionKey;
46-
}
47-
4838
getMetaInfo(document) {
4939
let metaViewRows = [];
5040

browser/base/content/pageinfo/pageInfo.js

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ const cacheService = Cc[
271271
"@mozilla.org/netwerk/cache-storage-service;1"
272272
].getService(nsICacheStorageService);
273273

274-
var diskStorage = null;
274+
var loadContextInfo = Services.loadContextInfo.fromLoadContext(
275+
window.docShell.QueryInterface(Ci.nsILoadContext),
276+
false
277+
);
278+
var diskStorage = cacheService.diskCacheStorage(loadContextInfo);
275279

276280
const nsICookiePermission = Ci.nsICookiePermission;
277281

@@ -460,20 +464,6 @@ async function loadTab(args) {
460464
let browsingContext = args?.browsingContext;
461465
let browser = args?.browser;
462466

463-
// Check if diskStorage has not be created yet if it has not been, get
464-
// partitionKey from content process and create diskStorage with said partitionKey
465-
if (!diskStorage) {
466-
let oaWithPartitionKey = await getOaWithPartitionKey(
467-
browsingContext,
468-
browser
469-
);
470-
let loadContextInfo = Services.loadContextInfo.custom(
471-
false,
472-
oaWithPartitionKey
473-
);
474-
diskStorage = cacheService.diskCacheStorage(loadContextInfo);
475-
}
476-
477467
/* Load the page info */
478468
await loadPageInfo(browsingContext, imageElement, browser);
479469

@@ -1180,16 +1170,3 @@ function checkProtocol(img) {
11801170
/^(https?|file|about|chrome|resource):/.test(url)
11811171
);
11821172
}
1183-
1184-
async function getOaWithPartitionKey(browsingContext, browser) {
1185-
browser = browser || window.opener.gBrowser.selectedBrowser;
1186-
browsingContext = browsingContext || browser.browsingContext;
1187-
1188-
let actor = browsingContext.currentWindowGlobal.getActor("PageInfo");
1189-
let partitionKeyFromChild = await actor.sendQuery("PageInfo:getPartitionKey");
1190-
1191-
let oa = browser.contentPrincipal.originAttributes;
1192-
oa.partitionKey = partitionKeyFromChild.partitionKey;
1193-
1194-
return oa;
1195-
}

browser/base/content/test/pageinfo/browser_pageinfo_images.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,3 @@ add_task(async function test_view_image_info() {
9191
}
9292
);
9393
});
94-
95-
add_task(async function test_image_size() {
96-
await BrowserTestUtils.withNewTab(
97-
TEST_PATH + "all_images.html",
98-
async function () {
99-
let pageInfo = BrowserPageInfo(
100-
gBrowser.selectedBrowser.currentURI.spec,
101-
"mediaTab"
102-
);
103-
await BrowserTestUtils.waitForEvent(pageInfo, "page-info-init");
104-
105-
let imageSize = pageInfo.document.getElementById("imagesizetext");
106-
107-
Assert.notEqual("media-unknown-not-cached", imageSize.value);
108-
109-
pageInfo.close();
110-
}
111-
);
112-
});

0 commit comments

Comments
 (0)