mirror of
https://github.com/microsoft/playwright.git
synced 2026-09-14 14:08:10 +08:00
feat(firefox): roll to r1544 (#42631)
Co-authored-by: microsoft-playwright-automation[bot] <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4302dbb90f
commit
5ea7ac2cf3
@@ -1,3 +1,3 @@
|
||||
REMOTE_URL="https://github.com/mozilla-firefox/firefox"
|
||||
BASE_BRANCH="release"
|
||||
BASE_REVISION="f1b6c0f86b96b7e0688c26f65803576f27cdaf88"
|
||||
BASE_REVISION="d065a04bc5610f496762935dee56604a78b91b51"
|
||||
|
||||
@@ -542,6 +542,9 @@ class NetworkRequest {
|
||||
try {
|
||||
remoteIPAddress = this.httpChannel.remoteAddress;
|
||||
remotePort = this.httpChannel.remotePort;
|
||||
// Gecko reports bare IPv6 addresses, bracket them to match Chromium.
|
||||
if (remoteIPAddress && remoteIPAddress.includes(':'))
|
||||
remoteIPAddress = `[${remoteIPAddress}]`;
|
||||
} catch (e) {
|
||||
// remoteAddress is not defined for cached requests.
|
||||
}
|
||||
@@ -906,7 +909,12 @@ class ResponseStorage {
|
||||
// Note: fulfilled request comes with decoded body right away.
|
||||
if ((request.httpChannel instanceof Ci.nsIEncodedChannel) && request.httpChannel.contentEncodings && !request.httpChannel.applyConversion && !request._fulfilled) {
|
||||
const encodingHeader = request.httpChannel.getResponseHeader("Content-Encoding");
|
||||
encodings = encodingHeader.split(/\s*\t*,\s*\t*/);
|
||||
// Firefox itself skips "identity" and empty encodings when applying content
|
||||
// conversions, and there is no stream converter registered for them.
|
||||
encodings = encodingHeader.split(/\s*\t*,\s*\t*/).filter(encoding => {
|
||||
const normalized = encoding.trim().toLowerCase();
|
||||
return normalized && normalized !== 'identity' && normalized !== 'x-identity';
|
||||
});
|
||||
}
|
||||
this._responses.set(request.requestId, {
|
||||
body,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
const {Helper} = ChromeUtils.importESModule('chrome://juggler/content/Helper.js');
|
||||
const {Preferences} = ChromeUtils.importESModule("resource://gre/modules/Preferences.sys.mjs");
|
||||
const {ContextualIdentityService} = ChromeUtils.importESModule("resource://gre/modules/ContextualIdentityService.sys.mjs");
|
||||
const {ContextualIdentityService} = ChromeUtils.importESModule("moz-src:///toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs");
|
||||
const {NetUtil} = ChromeUtils.importESModule('resource://gre/modules/NetUtil.sys.mjs');
|
||||
const {AppConstants} = ChromeUtils.importESModule("resource://gre/modules/AppConstants.sys.mjs");
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ ActorManagerParent.addJSWindowActors({
|
||||
},
|
||||
},
|
||||
allFrames: true,
|
||||
safeForUntrustedWebProcess: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -158,4 +159,3 @@ const jugglerInstance = new Juggler();
|
||||
export var JugglerFactory = function() {
|
||||
return jugglerInstance;
|
||||
};
|
||||
|
||||
|
||||
@@ -56,6 +56,10 @@ const disallowedMessageCategories = new Set([
|
||||
class Runtime {
|
||||
constructor(isWorker = false) {
|
||||
this._debugger = new Debugger();
|
||||
// A debuggee global with these flags unset is pinned to the debuggable wasm/asm.js
|
||||
// baseline tier, with the optimizing compiler disabled entirely.
|
||||
this._debugger.allowUnobservedWasm = true;
|
||||
this._debugger.allowUnobservedAsmJS = true;
|
||||
this._pendingPromises = new Map();
|
||||
this._executionContexts = new Map();
|
||||
this._windowToExecutionContext = new Map();
|
||||
@@ -257,29 +261,37 @@ class Runtime {
|
||||
resolve = a;
|
||||
reject = b;
|
||||
});
|
||||
this._pendingPromises.set(obj.promiseID, {resolve, reject, executionContext, exceptionDetails});
|
||||
this._pendingPromises.set(obj.promiseID, {resolve, reject, executionContext, exceptionDetails, promiseObj: obj});
|
||||
// Debugger.onPromiseSettled hook was removed in Bug 2044167. Instead, attach
|
||||
// reactions inside the debuggee that run a `debugger;` statement upon settling,
|
||||
// and sweep pending promises from the onDebuggerStatement hook. Unlike
|
||||
// dereferencing the promise and adding reactions from the privileged
|
||||
// compartment, this also works in workers where there are no Xrays.
|
||||
if (this._pendingPromises.size === 1)
|
||||
this._debugger.onPromiseSettled = this._onPromiseSettled.bind(this);
|
||||
this._debugger.onDebuggerStatement = this._onDebuggerStatement.bind(this);
|
||||
executionContext._debuggee.executeInGlobalWithBindings(
|
||||
'p.then(() => { debugger; }, () => { debugger; })', {p: obj}, {useInnerBindings: true});
|
||||
return await promise;
|
||||
}
|
||||
|
||||
_onPromiseSettled(obj) {
|
||||
const pendingPromise = this._pendingPromises.get(obj.promiseID);
|
||||
if (!pendingPromise)
|
||||
return;
|
||||
this._pendingPromises.delete(obj.promiseID);
|
||||
_onDebuggerStatement() {
|
||||
for (const [promiseID, pendingPromise] of this._pendingPromises) {
|
||||
const obj = pendingPromise.promiseObj;
|
||||
if (obj.promiseState === 'pending')
|
||||
continue;
|
||||
this._pendingPromises.delete(promiseID);
|
||||
if (obj.promiseState === 'fulfilled') {
|
||||
pendingPromise.resolve({success: true, obj: obj.promiseValue});
|
||||
continue;
|
||||
}
|
||||
const debuggee = pendingPromise.executionContext._debuggee;
|
||||
const errorInfo = debuggee.executeInGlobalWithBindings('({m: e?.message, s: e?.stack})', {e: obj.promiseReason}, {useInnerBindings: true}).return;
|
||||
pendingPromise.exceptionDetails.text = errorInfo.getOwnPropertyDescriptor('m').value;
|
||||
pendingPromise.exceptionDetails.stack = errorInfo.getOwnPropertyDescriptor('s').value;
|
||||
pendingPromise.resolve({success: false, obj: null});
|
||||
}
|
||||
if (!this._pendingPromises.size)
|
||||
this._debugger.onPromiseSettled = undefined;
|
||||
|
||||
if (obj.promiseState === 'fulfilled') {
|
||||
pendingPromise.resolve({success: true, obj: obj.promiseValue});
|
||||
return;
|
||||
};
|
||||
const debuggee = pendingPromise.executionContext._debuggee;
|
||||
const errorInfo = debuggee.executeInGlobalWithBindings('({m: e?.message, s: e?.stack})', {e: obj.promiseReason}, {useInnerBindings: true}).return;
|
||||
pendingPromise.exceptionDetails.text = errorInfo.getOwnPropertyDescriptor('m').value;
|
||||
pendingPromise.exceptionDetails.stack = errorInfo.getOwnPropertyDescriptor('s').value;
|
||||
pendingPromise.resolve({success: false, obj: null});
|
||||
this._debugger.onDebuggerStatement = undefined;
|
||||
}
|
||||
|
||||
createExecutionContext(domWindow, contextGlobal, auxData) {
|
||||
@@ -307,7 +319,7 @@ class Runtime {
|
||||
}
|
||||
}
|
||||
if (!this._pendingPromises.size)
|
||||
this._debugger.onPromiseSettled = undefined;
|
||||
this._debugger.onDebuggerStatement = undefined;
|
||||
this._debugger.removeDebuggee(destroyedContext._contextGlobal);
|
||||
this._executionContexts.delete(destroyedContext._id);
|
||||
if (destroyedContext._domWindow)
|
||||
|
||||
@@ -22,6 +22,10 @@ const runtime = new Runtime(true /* isWorker */);
|
||||
// Create execution context in the runtime only when the script
|
||||
// source was actually evaluated in it.
|
||||
const dbg = new Debugger(global);
|
||||
// A debuggee global with these flags unset is pinned to the debuggable wasm/asm.js
|
||||
// baseline tier, with the optimizing compiler disabled entirely.
|
||||
dbg.allowUnobservedWasm = true;
|
||||
dbg.allowUnobservedAsmJS = true;
|
||||
if (dbg.findScripts({global}).length) {
|
||||
runtime.createExecutionContext(null /* domWindow */, global, {});
|
||||
} else {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,11 @@ pref("dom.security.https_first", false);
|
||||
pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
pref("datareporting.policy.dataSubmissionPolicyAccepted", false);
|
||||
pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
|
||||
// Do not show the "Terms of Use" first-run notification (Firefox 154+).
|
||||
pref("termsofuse.bypassNotification", true);
|
||||
// Do not show the pre-onboarding splash modal in the first window; it waits
|
||||
// for Nimbus experiments to load and blocks all mouse input (Firefox 154+).
|
||||
pref("browser.preonboarding.enabled", false);
|
||||
|
||||
// Force pdfs into downloads.
|
||||
pref("pdfjs.disabled", true);
|
||||
@@ -148,7 +153,7 @@ pref("ui.use_standins_for_native_colors", true);
|
||||
// Turn off the Push service.
|
||||
pref("dom.push.serverURL", "");
|
||||
// Prevent Remote Settings (firefox.settings.services.mozilla.com) to issue non local connections.
|
||||
pref("services.settings.server", "");
|
||||
pref("services.settings.server", "data:,#remote-settings-dummy/v1");
|
||||
// Prevent location.services.mozilla.com to issue non local connections.
|
||||
pref("browser.region.network.url", "");
|
||||
pref("browser.pocket.enabled", false);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
{
|
||||
"name": "firefox",
|
||||
"revision": "1543",
|
||||
"revision": "1544",
|
||||
"installByDefault": true,
|
||||
"browserVersion": "155.0",
|
||||
"title": "Firefox"
|
||||
|
||||
Reference in New Issue
Block a user