Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a5daba9

Browse files
authored
chore: update browser_patches to 63a0173c4 (#37111)
1 parent a4e6e80 commit a5daba9

File tree

11 files changed

+1028
-1240
lines changed

11 files changed

+1028
-1240
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
REMOTE_URL="https://github.com/mozilla-firefox/firefox"
22
BASE_BRANCH="release"
3-
BASE_REVISION="00656c9425c51ee035578ca6ebebe13c755b0375"
3+
BASE_REVISION="361373160356d92cb5cd4d67783a3806c776ee78"

browser_patches/firefox/juggler/JugglerFrameParent.jsm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class JugglerFrameParent extends JSWindowActorParent {
1616
// Actors are registered per the WindowGlobalParent / WindowGlobalChild pair. We are only
1717
// interested in those WindowGlobalParent actors that are matching current browsingContext
1818
// window global.
19-
// See https://github.com/mozilla/gecko-dev/blob/cd2121e7d83af1b421c95e8c923db70e692dab5f/testing/mochitest/BrowserTestUtils/BrowserTestUtilsParent.sys.mjs#L15
19+
// See https://github.com/mozilla-firefox/firefox/blob/35e22180b0b61413dd8eccf6c00b1c6fac073eee/testing/mochitest/BrowserTestUtils/BrowserTestUtilsParent.sys.mjs#L15
2020
if (!this.manager?.isCurrentGlobal)
2121
return;
2222

browser_patches/firefox/juggler/TargetRegistry.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,9 +1023,9 @@ class BrowserContext {
10231023
if (ignoreHTTPSErrors) {
10241024
Preferences.set("network.stricttransportsecurity.preloadlist", false);
10251025
Preferences.set("security.cert_pinning.enforcement_level", 0);
1026-
certOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyData(true, this.userContextId);
1026+
certOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyDataForUserContext(this.userContextId, true);
10271027
} else {
1028-
certOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyData(false, this.userContextId);
1028+
certOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyDataForUserContext(this.userContextId, false);
10291029
}
10301030
}
10311031

@@ -1167,6 +1167,7 @@ class BrowserContext {
11671167
getCookies() {
11681168
const result = [];
11691169
const sameSiteToProtocol = {
1170+
[Ci.nsICookie.SAMESITE_UNSET]: 'None',
11701171
[Ci.nsICookie.SAMESITE_NONE]: 'None',
11711172
[Ci.nsICookie.SAMESITE_LAX]: 'Lax',
11721173
[Ci.nsICookie.SAMESITE_STRICT]: 'Strict',

browser_patches/firefox/juggler/components/Juggler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class Juggler {
6565
}
6666

6767
// This flow is taken from Remote agent and Marionette.
68-
// See https://github.com/mozilla/gecko-dev/blob/0c1b4921830e6af8bc951da01d7772de2fe60a08/remote/components/RemoteAgent.jsm#L302
68+
// See https://github.com/mozilla-firefox/firefox/blob/35e22180b0b61413dd8eccf6c00b1c6fac073eee/remote/components/RemoteAgent.sys.mjs#L417
6969
async observe(subject, topic) {
7070
switch (topic) {
7171
case "profile-after-change":

browser_patches/firefox/juggler/content/main.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function initialize(browsingContext, docShell) {
2121
const applySetting = {
2222
geolocation: (geolocation) => {
2323
if (geolocation) {
24-
docShell.setGeolocationOverride({
24+
browsingContext.setGeolocationServiceOverride({
2525
coords: {
2626
latitude: geolocation.latitude,
2727
longitude: geolocation.longitude,
@@ -31,14 +31,12 @@ export function initialize(browsingContext, docShell) {
3131
heading: NaN,
3232
speed: NaN,
3333
},
34-
address: null,
3534
timestamp: Date.now()
3635
});
3736
} else {
38-
docShell.setGeolocationOverride(null);
37+
browsingContext.setGeolocationServiceOverride();
3938
}
4039
},
41-
4240
bypassCSP: (bypassCSP) => {
4341
docShell.bypassCSPEnabled = bypassCSP;
4442
},
@@ -101,16 +99,20 @@ export function initialize(browsingContext, docShell) {
10199
},
102100

103101
async awaitViewportDimensions({width, height}) {
104-
const win = docShell.domWindow;
105-
if (win.innerWidth === width && win.innerHeight === height)
106-
return;
107102
await new Promise(resolve => {
108-
const listener = helper.addEventListener(win, 'resize', () => {
109-
if (win.innerWidth === width && win.innerHeight === height) {
110-
helper.removeListeners([listener]);
103+
const listeners = [];
104+
const check = () => {
105+
helper.removeListeners(listeners);
106+
if (docShell.domWindow.innerWidth === width && docShell.domWindow.innerHeight === height) {
111107
resolve();
108+
return;
112109
}
113-
});
110+
// Note: "domWindow" listeners are often removed upon navigation, as specced.
111+
// To survive viewport changes across navigations, re-install listeners upon commit.
112+
listeners.push(helper.addEventListener(docShell.domWindow, 'resize', check));
113+
listeners.push(helper.addEventListener(data.frameTree, 'navigationcommitted', check));
114+
};
115+
check();
114116
});
115117
},
116118

browser_patches/firefox/juggler/protocol/BrowserHandler.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"use strict";
66

77
const {AddonManager} = ChromeUtils.importESModule("resource://gre/modules/AddonManager.sys.mjs");
8+
const {XPIProvider} = ChromeUtils.importESModule("resource://gre/modules/addons/XPIProvider.sys.mjs");
89
const {TargetRegistry} = ChromeUtils.importESModule("chrome://juggler/content/TargetRegistry.js");
910
const {Helper} = ChromeUtils.importESModule('chrome://juggler/content/Helper.js');
1011
const {PageHandler} = ChromeUtils.importESModule("chrome://juggler/content/protocol/PageHandler.js");
@@ -147,6 +148,10 @@ export class BrowserHandler {
147148
]);
148149
}
149150
await this._startCompletePromise;
151+
await Promise.all([
152+
...XPIProvider.startupPromises,
153+
...XPIProvider.enabledAddonsStartupPromises,
154+
]);
150155
this._onclose();
151156
Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
152157
}
@@ -166,7 +171,9 @@ export class BrowserHandler {
166171
['Browser.clearCache']() {
167172
// Clearing only the context cache does not work: https://bugzilla.mozilla.org/show_bug.cgi?id=1819147
168173
Services.cache2.clear();
169-
ChromeUtils.clearStyleSheetCache();
174+
ChromeUtils.clearResourceCache({
175+
types: ["stylesheet"],
176+
});
170177
}
171178

172179
['Browser.setHTTPCredentials']({browserContextId, credentials}) {

browser_patches/firefox/juggler/screencast/nsScreencastService.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "nsScreencastService.h"
66

7+
#include "gfxPlatform.h"
78
#include "ScreencastEncoder.h"
89
#include "HeadlessWidget.h"
910
#include "HeadlessWindowCapturer.h"

0 commit comments

Comments
 (0)