icecat: add release icecat-140.8.0-2 for aramo
This commit is contained in:
parent
d9a6c0aa96
commit
d570f39e11
616 changed files with 39955 additions and 33937 deletions
|
|
@ -11,7 +11,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/CmdLineAndEnvUtils.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/DynamicallyLinkedFunctionPtr.h"
|
||||
#include "mozilla/glue/Debug.h"
|
||||
#include "mozilla/GeckoArgs.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
|
|
@ -19,12 +18,14 @@
|
|||
#include "mozilla/SafeMode.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/WindowsConsole.h"
|
||||
#include "mozilla/WindowsProcessMitigations.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "mozilla/WinHeaderOnlyUtils.h"
|
||||
#include "nsWindowsHelpers.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <processthreadsapi.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "DllBlocklistInit.h"
|
||||
#include "ErrorHandler.h"
|
||||
|
|
@ -111,16 +112,82 @@ static nsReturnRef<HANDLE> CreateJobAndAssignProcess(HANDLE aProcess) {
|
|||
return job.out();
|
||||
}
|
||||
|
||||
#if !defined( \
|
||||
PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON)
|
||||
# define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON \
|
||||
(0x00000001ULL << 60)
|
||||
#endif // !defined(PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON)
|
||||
enum class VCRuntimeDLLDir : bool {
|
||||
Application,
|
||||
System,
|
||||
};
|
||||
static bool GetMSVCP140VersionInfo(VCRuntimeDLLDir aDir,
|
||||
uint64_t& aOutVersion) {
|
||||
wchar_t dllPath[MAX_PATH];
|
||||
if (aDir == VCRuntimeDLLDir::Application) {
|
||||
DWORD size = ::GetModuleFileNameW(nullptr, dllPath, MAX_PATH);
|
||||
if (!size ||
|
||||
(size == MAX_PATH && ::GetLastError() == ERROR_INSUFFICIENT_BUFFER) ||
|
||||
!::PathRemoveFileSpecW(dllPath)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
MOZ_ASSERT(aDir == VCRuntimeDLLDir::System);
|
||||
UINT size = ::GetSystemDirectoryW(dllPath, MAX_PATH);
|
||||
if (!size || size >= MAX_PATH) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_OFF)
|
||||
# define PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_OFF \
|
||||
(0x00000002ULL << 40)
|
||||
#endif // !defined(PROCESS_CREATION_MITIGATION_POLICY_CONTROL_FLOW_GUARD_ALWAYS_OFF)
|
||||
if (!::PathAppendW(dllPath, L"msvcp140.dll")) {
|
||||
return false;
|
||||
}
|
||||
HMODULE crt =
|
||||
::LoadLibraryExW(dllPath, nullptr, LOAD_LIBRARY_AS_IMAGE_RESOURCE);
|
||||
if (!crt) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mozilla::nt::PEHeaders headers{crt};
|
||||
bool result = headers.GetVersionInfo(aOutVersion);
|
||||
::FreeLibrary(crt);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Choose whether we want to favor loading DLLs from the system directory over
|
||||
* the application directory. This choice automatically propagates to all child
|
||||
* processes. In particular, it determines whether child processes will load
|
||||
* Visual C++ runtime DLLs from the system or the application directory at
|
||||
* startup.
|
||||
*
|
||||
* Whenever possible, we want all processes to favor loading DLLs from the
|
||||
* system directory. But if old Visual C++ runtime DLLs are installed
|
||||
* system-wide, then we must favor loading from the application directory
|
||||
* instead to ensure compatibility, at least during startup. So in this case we
|
||||
* only apply the delayed variant of the mitigation and only in sandboxed
|
||||
* processes, which is the best compromise (see SandboxBroker::LaunchApp).
|
||||
*
|
||||
* This function is called from the launcher process *and* the browser process.
|
||||
* This is because if the launcher process is disabled, we still want the
|
||||
* browser process to go through this code so that it enforces the correct
|
||||
* choice for itself and for child processes.
|
||||
*/
|
||||
static void EnablePreferLoadFromSystem32IfCompatible() {
|
||||
// We may already have the mitigation if we are the browser process and we
|
||||
// inherited it from the launcher process.
|
||||
if (!mozilla::IsPreferLoadFromSystem32Available() ||
|
||||
mozilla::IsPreferLoadFromSystem32Enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only bail out if (1) there is a conflict because the two DLLs exist *and*
|
||||
// (2) the version of the system DLL is problematic.
|
||||
uint64_t systemDirVersion = 0, appDirVersion = 0;
|
||||
if (GetMSVCP140VersionInfo(VCRuntimeDLLDir::System, systemDirVersion) &&
|
||||
GetMSVCP140VersionInfo(VCRuntimeDLLDir::Application, appDirVersion) &&
|
||||
systemDirVersion < appDirVersion) {
|
||||
return;
|
||||
}
|
||||
|
||||
mozilla::DebugOnly<bool> setOk = mozilla::EnablePreferLoadFromSystem32();
|
||||
MOZ_ASSERT(setOk);
|
||||
}
|
||||
|
||||
/**
|
||||
* Any mitigation policies that should be set on the browser process should go
|
||||
|
|
@ -128,10 +195,11 @@ static nsReturnRef<HANDLE> CreateJobAndAssignProcess(HANDLE aProcess) {
|
|||
*/
|
||||
static void SetMitigationPolicies(mozilla::ProcThreadAttributes& aAttrs,
|
||||
const bool aIsSafeMode) {
|
||||
if (mozilla::IsWin10AnniversaryUpdateOrLater()) {
|
||||
aAttrs.AddMitigationPolicy(
|
||||
PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON);
|
||||
}
|
||||
// Note: Do *not* handle IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON here. For this
|
||||
// mitigation we rely on EnablePreferLoadFromSystem32IfCompatible().
|
||||
// The launcher process or the browser process will choose whether we
|
||||
// want to apply the mitigation or not, and child processes will
|
||||
// automatically inherit that choice.
|
||||
|
||||
#if defined(_M_ARM64)
|
||||
// Disable CFG on older versions of ARM64 Windows to avoid a crash in COM.
|
||||
|
|
@ -286,6 +354,9 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
|
|||
return Nothing();
|
||||
}
|
||||
|
||||
// Called from the launcher process *and* the browser process.
|
||||
EnablePreferLoadFromSystem32IfCompatible();
|
||||
|
||||
#if defined(MOZ_LAUNCHER_PROCESS)
|
||||
LauncherRegistryInfo regInfo;
|
||||
Maybe<bool> runAsLauncher = RunAsLauncherProcess(regInfo, argc, argv);
|
||||
|
|
@ -309,22 +380,6 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
|
|||
return Nothing();
|
||||
}
|
||||
|
||||
// Make sure that the launcher process itself has image load policies set
|
||||
if (IsWin10AnniversaryUpdateOrLater()) {
|
||||
static const StaticDynamicallyLinkedFunctionPtr<
|
||||
decltype(&SetProcessMitigationPolicy)>
|
||||
pSetProcessMitigationPolicy(L"kernel32.dll",
|
||||
"SetProcessMitigationPolicy");
|
||||
if (pSetProcessMitigationPolicy) {
|
||||
PROCESS_MITIGATION_IMAGE_LOAD_POLICY imgLoadPol = {};
|
||||
imgLoadPol.PreferSystem32Images = 1;
|
||||
|
||||
DebugOnly<BOOL> setOk = pSetProcessMitigationPolicy(
|
||||
ProcessImageLoadPolicy, &imgLoadPol, sizeof(imgLoadPol));
|
||||
MOZ_ASSERT(setOk);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(MOZ_SANDBOX)
|
||||
// Ensure the relevant mitigations are enforced.
|
||||
mozilla::sandboxing::ApplyParentProcessMitigations();
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ OS_LIBS += [
|
|||
"oleaut32",
|
||||
"ole32",
|
||||
"rpcrt4",
|
||||
"shlwapi",
|
||||
"version",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@ let JSWINDOWACTORS = {
|
|||
},
|
||||
},
|
||||
matches: ["about:messagepreview", "about:messagepreview?*"],
|
||||
remoteTypes: ["privilegedabout"],
|
||||
enablePreference:
|
||||
"browser.newtabpage.activity-stream.asrouter.devtoolsEnabled",
|
||||
},
|
||||
|
||||
AboutPocket: {
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ static const RedirEntry kRedirMap[] = {
|
|||
{"messagepreview",
|
||||
"chrome://browser/content/messagepreview/messagepreview.html",
|
||||
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
|
||||
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
|
||||
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
|
||||
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT},
|
||||
{"pocket-saved", "chrome://pocket/content/panels/saved.html",
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ add_task(async function test_recover_storeID() {
|
|||
await SelectableProfileService.init();
|
||||
|
||||
Assert.ok(
|
||||
!ProfilesDatastoreService.initialized,
|
||||
"Didn't initialize the datastore service"
|
||||
ProfilesDatastoreService.initialized,
|
||||
"Initialized the datastore service"
|
||||
);
|
||||
Assert.ok(
|
||||
!SelectableProfileService.initialized,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include "mozilla/Result.h"
|
||||
#include "mozilla/ResultVariant.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#include "mozilla/WinHeaderOnlyUtils.h"
|
||||
#include "mozilla/widget/WinTaskbar.h"
|
||||
#include "WinUtils.h"
|
||||
|
|
@ -186,7 +187,16 @@ Win11PinToTaskBarResult PinCurrentAppToTaskbarWin11(
|
|||
Win11PinToTaskBarResult unlockStatus =
|
||||
UnlockLimitedAccessFeature(Win11LimitedAccessFeatureType::Taskbar);
|
||||
if (unlockStatus.result != Win11PinToTaskBarResultStatus::Success) {
|
||||
return unlockStatus;
|
||||
// Limited Access Feature no longer necessary for Windows 11 26200 Build
|
||||
// 7840, and possibly other channels.
|
||||
if (!IsWin11OrLater()) {
|
||||
return unlockStatus;
|
||||
}
|
||||
|
||||
TASKBAR_PINNING_LOG(
|
||||
LogLevel::Warning,
|
||||
"Limited Access Feature failed to unlock, attempting to use Taskbar "
|
||||
"Pinning API assuming LAF is no longer necessary.");
|
||||
}
|
||||
|
||||
HRESULT hr;
|
||||
|
|
@ -407,7 +417,16 @@ Win11PinToTaskBarResult IsCurrentAppPinnedToTaskbarWin11(bool aCheckOnly) {
|
|||
Win11PinToTaskBarResult unlockStatus =
|
||||
UnlockLimitedAccessFeature(Win11LimitedAccessFeatureType::Taskbar);
|
||||
if (unlockStatus.result != Win11PinToTaskBarResultStatus::Success) {
|
||||
return unlockStatus;
|
||||
// Limited Access Feature no longer necessary for Windows 11 26200 Build
|
||||
// 7840, and possibly other channels.
|
||||
if (!IsWin11OrLater()) {
|
||||
return unlockStatus;
|
||||
}
|
||||
|
||||
TASKBAR_PINNING_LOG(
|
||||
LogLevel::Warning,
|
||||
"Limited Access Feature failed to unlock, attempting to use Taskbar "
|
||||
"Pinning API assuming LAF is no longer necessary.");
|
||||
}
|
||||
|
||||
HRESULT hr;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
140.7.1
|
||||
140.8.0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
140.7.1esr
|
||||
140.8.0esr
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ MOZ_BRANDING_DIRECTORY=browser/branding/unofficial
|
|||
MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official
|
||||
# IceCat settings
|
||||
MOZ_APP_BASENAME=IceCat
|
||||
MOZ_APP_VERSION=140.7.1
|
||||
MOZ_APP_VERSION=140.8.0
|
||||
MOZ_DATA_REPORTING=0
|
||||
|
|
|
|||
|
|
@ -1473,6 +1473,9 @@ async function triggerCapture(browser, submitButtonSelector, fillSelectors) {
|
|||
* @param {object} patterns.captureExpectedRecord
|
||||
* The expected saved record after capturing the form. Keyed by field name. This
|
||||
* parameter is only used when `options.testCapture` is set.
|
||||
* @param {boolean} patterns.useTestYear
|
||||
* Set to the current year to assign while running the test, useful for credit
|
||||
* card expiry tests with a manual set of year options in the dropdown.
|
||||
* @param {object} patterns.only
|
||||
* This parameter is used solely for debugging purposes. When set to true,
|
||||
* it restricts the execution to only the specified testcase.
|
||||
|
|
@ -1597,16 +1600,32 @@ async function add_heuristic_tests(
|
|||
const sleepAfterFocus = contexts.length > 1;
|
||||
|
||||
for (const context of contexts) {
|
||||
await SpecialPowers.spawn(context, [], async () => {
|
||||
const elements = Array.from(
|
||||
content.document.querySelectorAll("input, select")
|
||||
);
|
||||
// Focus on each field in the test document to trigger autofill field detection
|
||||
// on all the fields.
|
||||
elements.forEach(element => {
|
||||
element.focus();
|
||||
});
|
||||
});
|
||||
await SpecialPowers.spawn(
|
||||
context,
|
||||
[testPattern.useTestYear],
|
||||
async year => {
|
||||
let FormAutofillHeuristics;
|
||||
if (year) {
|
||||
FormAutofillHeuristics = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/shared/FormAutofillHeuristics.sys.mjs"
|
||||
).FormAutofillHeuristics;
|
||||
FormAutofillHeuristics.useTestYear = year;
|
||||
}
|
||||
|
||||
const elements = Array.from(
|
||||
content.document.querySelectorAll("input, select")
|
||||
);
|
||||
// Focus on each field in the test document to trigger autofill field detection
|
||||
// on all the fields.
|
||||
elements.forEach(element => {
|
||||
element.focus();
|
||||
});
|
||||
|
||||
if (year) {
|
||||
FormAutofillHeuristics.useTestYear = null;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
try {
|
||||
await BrowserTestUtils.synthesizeKey("VK_ESCAPE", {}, context);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ support-files = [
|
|||
["browser_BestBuy.js"]
|
||||
|
||||
["browser_CDW.js"]
|
||||
skip-if = ["true"] # Bug 1939626
|
||||
|
||||
["browser_CostCo.js"]
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ add_heuristic_tests(
|
|||
},
|
||||
{
|
||||
fixturePath: "Checkout_BillingPaymentInfo.html",
|
||||
useTestYear: 2024,
|
||||
expectedResult: [
|
||||
{
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ add_heuristic_tests(
|
|||
},
|
||||
{
|
||||
fixturePath: "Payment.html",
|
||||
useTestYear: 2025,
|
||||
expectedResult: [
|
||||
{
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ add_heuristic_tests(
|
|||
[
|
||||
{
|
||||
fixturePath: "Payment.html",
|
||||
useTestYear: 2024,
|
||||
expectedResult: [
|
||||
{
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ add_heuristic_tests(
|
|||
[
|
||||
{
|
||||
fixturePath: "Checkout_Payment.html",
|
||||
useTestYear: 2024,
|
||||
expectedResult: [
|
||||
{
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ add_heuristic_tests(
|
|||
[
|
||||
{
|
||||
fixturePath: "index.html",
|
||||
useTestYear: 2024,
|
||||
expectedResult: [
|
||||
{
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -120,3 +120,65 @@ window.wrappedJSObject.chrome = cloneInto(
|
|||
window,
|
||||
{ cloneFunctions: true }
|
||||
);
|
||||
|
||||
const ua = navigator.userAgent;
|
||||
const mobile = ua.includes("Mobile") || ua.includes("Tablet");
|
||||
|
||||
// Very roughly matches Chromium's GetPlatformForUAMetadata()
|
||||
let platform = "Linux";
|
||||
if (mobile) {
|
||||
platform = "Android";
|
||||
} else if (navigator.platform.startsWith("Win")) {
|
||||
platform = "Windows";
|
||||
} else if (navigator.platform.startsWith("Mac")) {
|
||||
platform = "macOS";
|
||||
}
|
||||
|
||||
const version = (ua.match(/IceCat\/([0-9]+)/) || ["", "58.0"])[1];
|
||||
|
||||
// These match Chrome's output as of version 126.
|
||||
const brands = [
|
||||
{
|
||||
brand: "Not/A)Brand",
|
||||
version: "8",
|
||||
},
|
||||
{
|
||||
brand: "Chromium",
|
||||
version,
|
||||
},
|
||||
{
|
||||
brand: "Google Chrome",
|
||||
version,
|
||||
},
|
||||
];
|
||||
|
||||
const userAgentData = cloneInto(
|
||||
{
|
||||
brands,
|
||||
mobile,
|
||||
platform,
|
||||
getHighEntropyValues() {
|
||||
return window.wrappedJSObject.Promise.resolve(
|
||||
cloneInto(
|
||||
{
|
||||
brands,
|
||||
mobile,
|
||||
platform,
|
||||
platformVersion: "19.0.0",
|
||||
},
|
||||
window
|
||||
)
|
||||
);
|
||||
},
|
||||
},
|
||||
window,
|
||||
{ cloneFunctions: true }
|
||||
);
|
||||
|
||||
Object.defineProperty(window.navigator.wrappedJSObject, "userAgentData", {
|
||||
get: exportFunction(function () {
|
||||
return userAgentData;
|
||||
}, window),
|
||||
|
||||
set: exportFunction(function () {}, window),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Web Compatibility Interventions",
|
||||
"description": "Urgent post-release fixes for web compatibility.",
|
||||
"version": "140.11.0",
|
||||
"version": "140.12.0",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "webcompat@mozilla.org",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue