icecat: add release icecat-140.9.0-1gnu1 for ecne
This commit is contained in:
parent
8eb1f1732f
commit
a5f93cb214
1197 changed files with 30593 additions and 15344 deletions
|
|
@ -1188,6 +1188,7 @@ with modules["DOM_MEDIA"]:
|
|||
errors["NS_ERROR_DOM_MEDIA_RANGE_ERR"] = FAILURE(105)
|
||||
errors["NS_ERROR_DOM_MEDIA_TYPE_ERR"] = FAILURE(106)
|
||||
errors["NS_ERROR_DOM_MEDIA_MEDIA_ENGINE_INITIALIZATION_ERR"] = FAILURE(107)
|
||||
errors["NS_ERROR_DOM_MEDIA_DROPPED_BY_ENCODER_ERR"] = FAILURE(108)
|
||||
|
||||
# =======================================================================
|
||||
# 42: NS_ERROR_MODULE_URL_CLASSIFIER
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@
|
|||
#if defined(XP_LINUX)
|
||||
# include <unistd.h>
|
||||
# include <fstream>
|
||||
# ifndef ANDROID
|
||||
# include <link.h>
|
||||
# endif
|
||||
# include "mozilla/Tokenizer.h"
|
||||
# include "mozilla/widget/LSBUtils.h"
|
||||
# include "nsCharSeparatedTokenizer.h"
|
||||
|
|
@ -1423,6 +1426,106 @@ BOOL WINAPI IsUserCetAvailableInEnvironment(_In_ DWORD UserCetEnvironment);
|
|||
# define USER_CET_ENVIRONMENT_WIN32_PROCESS 0x00000000
|
||||
#endif
|
||||
|
||||
#if defined(XP_LINUX) && !defined(ANDROID)
|
||||
static constexpr char kGlibcxxPrefix[] = "GLIBCXX_";
|
||||
static constexpr size_t kGlibcxxPrefixLen = sizeof(kGlibcxxPrefix) - 1;
|
||||
|
||||
static int CompareGlibcxxVersions(const char* a, const char* b) {
|
||||
int aMajor = 0, aMinor = 0, aPatch = 0;
|
||||
int bMajor = 0, bMinor = 0, bPatch = 0;
|
||||
|
||||
sscanf(a, "%d.%d.%d", &aMajor, &aMinor, &aPatch);
|
||||
sscanf(b, "%d.%d.%d", &bMajor, &bMinor, &bPatch);
|
||||
|
||||
if (aMajor != bMajor) return aMajor - bMajor;
|
||||
if (aMinor != bMinor) return aMinor - bMinor;
|
||||
return aPatch - bPatch;
|
||||
}
|
||||
|
||||
static int LibStdCxxVersionCallback(struct dl_phdr_info* aInfo, size_t aSize,
|
||||
void* aData) {
|
||||
auto* version = static_cast<nsCString*>(aData);
|
||||
|
||||
if (aSize < sizeof(*aInfo) || !aInfo->dlpi_name ||
|
||||
!strstr(aInfo->dlpi_name, "libstdc++")) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < aInfo->dlpi_phnum; ++i) {
|
||||
if (aInfo->dlpi_phdr[i].p_type == PT_DYNAMIC) {
|
||||
const auto* dyn = reinterpret_cast<const ElfW(Dyn)*>(
|
||||
aInfo->dlpi_addr + aInfo->dlpi_phdr[i].p_vaddr);
|
||||
|
||||
ElfW(Addr) verdef_ptr = 0;
|
||||
size_t verdefnum = 0;
|
||||
ElfW(Addr) strtab_ptr = 0;
|
||||
|
||||
for (; dyn->d_tag != DT_NULL; ++dyn) {
|
||||
switch (dyn->d_tag) {
|
||||
case DT_VERDEF:
|
||||
verdef_ptr = dyn->d_un.d_ptr;
|
||||
break;
|
||||
case DT_VERDEFNUM:
|
||||
verdefnum = dyn->d_un.d_val;
|
||||
break;
|
||||
case DT_STRTAB:
|
||||
strtab_ptr = dyn->d_un.d_ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!verdef_ptr || !verdefnum || !strtab_ptr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const ElfW(Verdef)* verdef = reinterpret_cast<const ElfW(Verdef)*>(
|
||||
verdef_ptr < aInfo->dlpi_addr ? aInfo->dlpi_addr + verdef_ptr
|
||||
: verdef_ptr);
|
||||
const char* strtab = reinterpret_cast<const char*>(
|
||||
strtab_ptr < aInfo->dlpi_addr ? aInfo->dlpi_addr + strtab_ptr
|
||||
: strtab_ptr);
|
||||
|
||||
const char* highestVersion = nullptr;
|
||||
for (size_t j = 0; j < verdefnum; ++j) {
|
||||
if (verdef->vd_cnt > 0) {
|
||||
const auto* verdaux = reinterpret_cast<const ElfW(Verdaux)*>(
|
||||
reinterpret_cast<const char*>(verdef) + verdef->vd_aux);
|
||||
const char* verName = strtab + verdaux->vda_name;
|
||||
|
||||
if (strncmp(verName, kGlibcxxPrefix, kGlibcxxPrefixLen) == 0) {
|
||||
if (!highestVersion ||
|
||||
CompareGlibcxxVersions(verName + kGlibcxxPrefixLen,
|
||||
highestVersion + kGlibcxxPrefixLen) >
|
||||
0) {
|
||||
highestVersion = verName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (verdef->vd_next == 0) {
|
||||
break;
|
||||
}
|
||||
verdef = reinterpret_cast<const ElfW(Verdef)*>(
|
||||
reinterpret_cast<const char*>(verdef) + verdef->vd_next);
|
||||
}
|
||||
|
||||
if (highestVersion) {
|
||||
version->Assign(highestVersion + kGlibcxxPrefixLen);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool GetLibStdCxxVersion(nsCString& aVersion) {
|
||||
dl_iterate_phdr(LibStdCxxVersionCallback, &aVersion);
|
||||
return !aVersion.IsEmpty();
|
||||
}
|
||||
#endif
|
||||
|
||||
nsresult nsSystemInfo::Init() {
|
||||
// check that it is called from the main thread on all platforms.
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
|
@ -1673,6 +1776,13 @@ nsresult nsSystemInfo::Init() {
|
|||
SetPropertyAsACString(u"distro"_ns, dist);
|
||||
SetPropertyAsACString(u"distroVersion"_ns, release);
|
||||
}
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
nsCString libstdcxxVersion;
|
||||
glean::system_os::libstdcxx_version.Set(
|
||||
GetLibStdCxxVersion(libstdcxxVersion) ? libstdcxxVersion
|
||||
: nsDependentCString("unknown"));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(XP_LINUX) && defined(MOZ_SANDBOX)
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <msi.h>
|
||||
#include <winternl.h>
|
||||
#include "nsAutoRef.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Span.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
@ -336,4 +338,52 @@ inline bool IsDynamicBlocklistDisabled(bool isSafeMode,
|
|||
bool hasCommandLineDisableArgument) {
|
||||
return isSafeMode || hasCommandLineDisableArgument;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
NTSTATUS NTAPI RtlDosPathNameToNtPathName_U_WithStatus(PCWSTR aDosFileName,
|
||||
PUNICODE_STRING aNtName,
|
||||
PCWSTR* aFilePart,
|
||||
PVOID aRelativeName);
|
||||
}
|
||||
|
||||
// RAII wrapper that converts a Win32/DOS path to the NT namespace form
|
||||
// (e.g. \??\C:\...) via RtlDosPathNameToNtPathName_U_WithStatus. Handles all
|
||||
// Win32 path types correctly including UNC paths.
|
||||
class NtPathFromDosPath {
|
||||
public:
|
||||
explicit NtPathFromDosPath(const wchar_t* aDosPath) : mUnicodeString{} {
|
||||
mStatus = ::RtlDosPathNameToNtPathName_U_WithStatus(
|
||||
aDosPath, &mUnicodeString, nullptr, nullptr);
|
||||
}
|
||||
|
||||
~NtPathFromDosPath() {
|
||||
if (NT_SUCCESS(mStatus)) {
|
||||
::RtlFreeUnicodeString(&mUnicodeString);
|
||||
}
|
||||
}
|
||||
|
||||
NtPathFromDosPath(const NtPathFromDosPath&) = delete;
|
||||
NtPathFromDosPath& operator=(const NtPathFromDosPath&) = delete;
|
||||
|
||||
bool IsValid() const {
|
||||
return NT_SUCCESS(mStatus) && mUnicodeString.Length > 0;
|
||||
}
|
||||
|
||||
// Length of the path in bytes, not including any null terminator.
|
||||
USHORT LengthInBytes() const { return mUnicodeString.Length; }
|
||||
|
||||
// Copies the path into aBuffer. Returns false if aBuffer is too small.
|
||||
bool CopyTo(mozilla::Span<WCHAR> aBuffer) const {
|
||||
if (aBuffer.size_bytes() < mUnicodeString.Length) {
|
||||
return false;
|
||||
}
|
||||
memcpy(aBuffer.data(), mUnicodeString.Buffer, mUnicodeString.Length);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
UNICODE_STRING mUnicodeString;
|
||||
NTSTATUS mStatus;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -491,6 +491,14 @@ bool SlicedInputStream::Deserialize(
|
|||
|
||||
const SlicedInputStreamParams& params = aParams.get_SlicedInputStreamParams();
|
||||
|
||||
auto end = CheckedUint64(params.start()) + params.length();
|
||||
if (!end.isValid()) {
|
||||
return false;
|
||||
}
|
||||
if (params.curPos() > end.value()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIInputStream> stream =
|
||||
InputStreamHelper::DeserializeInputStream(params.stream());
|
||||
if (!stream) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static size_t CompressedBufferLength() {
|
|||
static size_t kCompressedBufferLength =
|
||||
detail::SnappyFrameUtils::MaxCompressedBufferLength(snappy::kBlockSize);
|
||||
|
||||
MOZ_ASSERT(kCompressedBufferLength > 0);
|
||||
MOZ_ASSERT(kCompressedBufferLength > detail::SnappyFrameUtils::kHeaderLength);
|
||||
return kCompressedBufferLength;
|
||||
}
|
||||
|
||||
|
|
@ -287,7 +287,9 @@ nsresult SnappyUncompressInputStream::ParseNextChunk(uint32_t* aBytesReadOut) {
|
|||
// We have no decompressed data, but we do know the size of the next chunk.
|
||||
// Read at least that much from the base stream.
|
||||
uint32_t readLength = mNextChunkDataLength;
|
||||
MOZ_ASSERT(readLength <= CompressedBufferLength());
|
||||
if (readLength > CompressedBufferLength() - kHeaderLength) {
|
||||
return NS_ERROR_CORRUPTED_CONTENT;
|
||||
}
|
||||
|
||||
// However, if there is enough data in the base stream, also read the next
|
||||
// chunk header. This helps optimize the stream by avoiding many small reads.
|
||||
|
|
|
|||
|
|
@ -1320,6 +1320,28 @@ system.os:
|
|||
- gijs@mozilla.com
|
||||
expires: never
|
||||
|
||||
libstdcxx_version:
|
||||
type: string
|
||||
lifetime: application
|
||||
description: |
|
||||
The Operating System's libstdc++ highest GLIBCXX version.
|
||||
Linux only.
|
||||
e.g. "3.4.33"
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=2016621
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=2016621
|
||||
data_sensitivity:
|
||||
- technical
|
||||
notification_emails:
|
||||
- mhommey@mozilla.com
|
||||
expires: never
|
||||
send_in_pings:
|
||||
- metrics
|
||||
- sync
|
||||
- update
|
||||
- third-party-modules
|
||||
|
||||
service_pack_major:
|
||||
type: quantity
|
||||
unit: version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue