1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00

www/qt5-webengine: Update to 5.15.2

* Under the hood runs Chromium 83.0.4103.122 with security fixes up to
  version 86.0.4240.183 and patches were taken from r540991 of www/chromium.

* Also adjust some patches to avoid hardcoding of ${LOCALBASE} and remove a
  redundant blank line.

Changelog:

* [QTBUG-84632] Warn about QtWebengineProcess launching from network share
                on Windows.
* [QTBUG-85363] Handle non-ASCII names for PulseAudio
* [QTBUG-85494] Fix regression crash when not handling
                QQuickWebEngineNewViewRequest
* [QTBUG-85817] Fix crashes on resize
* [QTBUG-86672] Fix remapped menu key being mapped back to menu key
* [QTBUG-86945] Fix crash when opening a PDF in debug build on windows.
* [QTBUG-87129] Mention node.js build-time dependency
* The QtWebEngineProcess now has a version number
* The old compositor has been removed and can no longer be restored using
  command line argument.

Approved by:	tcberner (kde)
Differential Revision:	https://reviews.freebsd.org/D27587
This commit is contained in:
Kai Knoblich 2020-12-19 07:57:02 +00:00
parent a81b480372
commit 223e08d1be
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=558439
151 changed files with 2070 additions and 1640 deletions

View File

@ -5,6 +5,16 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20201218:
AFFECTS: users of www/qt5-webengine
AUTHOR: kai@FreeBSD.org
Users that upgrade www/qt5-webengine without using pkg/poudriere might
experience failures due to conflicts with the installed version of 5.15.2.
In that case, pkg delete -f the qt5-webengine package before building
the updated version.
20201130:
AFFECTS: users of graphics/jpeg
AUTHOR: rene@FreeBSD.org

View File

@ -18,7 +18,6 @@
PORTNAME= webengine
DISTVERSION= ${QT5_VERSION}
PORTREVISION= 5
CATEGORIES= www
PKGNAMEPREFIX= qt5-
@ -50,7 +49,7 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
libwebp.so:graphics/webp
DISTINFO_FILE= ${.CURDIR}/distinfo
QT5_VERSION= 5.15.0
QT5_VERSION= 5.15.2
OPTIONS_SINGLE= AUDIO
OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO
@ -84,7 +83,6 @@ USE_QT= core declarative gui location network printsupport \
USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xorgproto \
xrandr xrender xscrnsaver xtst
QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg
# We could just set it to an empty string as well. "all" does not account for
@ -133,8 +131,16 @@ post-extract-SNDIO-on:
@${CP} ${FILESDIR}/audio_manager_openbsd.* \
${WRKSRC}/src/3rdparty/chromium/media/audio/openbsd
.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
${WRKSRC}/src/3rdparty/chromium/base/linux_util.cc \
${WRKSRC}/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni \
${WRKSRC}/src/3rdparty/chromium/chrome/common/chrome_paths.cc \
${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp \
${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/xfa/fgas/font/cfx_fontsourceenum_file.cpp \
${WRKSRC}/src/3rdparty/gn/build/gen.py
.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
@${REINPLACE_CMD} -e 's/icudtl.dat/icudtb.dat/' \
${WRKSRC}/src/core/core_module.pro
.endif

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1590608885
SHA256 (KDE/Qt/5.15.0/qtwebengine-everywhere-src-5.15.0.tar.xz) = c38e2fda7ed1b7d5a90f26abf231ec0715d78a5bc39a94673d8e39d75f04c5df
SIZE (KDE/Qt/5.15.0/qtwebengine-everywhere-src-5.15.0.tar.xz) = 278257432
TIMESTAMP = 1606050276
SHA256 (KDE/Qt/5.15.2/qtwebengine-everywhere-src-5.15.2.tar.xz) = c8afca0e43d84f7bd595436fbe4d13a5bbdb81ec5104d605085d07545b6f91e0
SIZE (KDE/Qt/5.15.2/qtwebengine-everywhere-src-5.15.2.tar.xz) = 280142544

View File

@ -38,50 +38,3 @@
EXPECT_CALL(callback_, OnError()).Times(2);
--- src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc
@@ -439,7 +439,7 @@ CMapTable::CMapFormat0::Builder::Builder(
}
CMapTable::CMapFormat0::Builder::Builder(const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat0,
cmap_id) {
}
@@ -563,7 +563,7 @@ CMapTable::CMapFormat2::Builder::Builder(WritableFontD
: CMapTable::CMap::Builder(data ? down_cast<WritableFontData*>(
data->Slice(offset, data->ReadUShort(
offset + Offset::kFormat0Length)))
- : reinterpret_cast<WritableFontData*>(NULL),
+ : static_cast<WritableFontData*>(NULL),
CMapFormat::kFormat2, cmap_id) {
// TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix.
}
@@ -574,7 +574,7 @@ CMapTable::CMapFormat2::Builder::Builder(ReadableFontD
: CMapTable::CMap::Builder(data ? down_cast<ReadableFontData*>(
data->Slice(offset, data->ReadUShort(
offset + Offset::kFormat0Length)))
- : reinterpret_cast<ReadableFontData*>(NULL),
+ : static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat2, cmap_id) {
// TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix.
}
@@ -958,7 +958,7 @@ CMapTable::CMapFormat4::Builder::Builder(WritableFontD
CMapTable::CMapFormat4::Builder::Builder(SegmentList* segments,
std::vector<int32_t>* glyph_id_array,
const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat4, cmap_id),
segments_(segments->begin(), segments->end()),
glyph_id_array_(glyph_id_array->begin(), glyph_id_array->end()) {
@@ -966,7 +966,7 @@ CMapTable::CMapFormat4::Builder::Builder(SegmentList*
}
CMapTable::CMapFormat4::Builder::Builder(const CMapId& cmap_id)
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
+ : CMap::Builder(static_cast<ReadableFontData*>(NULL),
CMapFormat::kFormat4, cmap_id) {
}

View File

@ -1,21 +1,12 @@
--- configure.pri.orig 2020-04-08 09:41:36 UTC
--- configure.pri.orig 2020-11-07 01:22:36 UTC
+++ configure.pri
@@ -114,7 +114,7 @@ defineTest(qtwebengine_platformError) {
defineTest(qtConfTest_detectPlatform) {
QT_FOR_CONFIG += gui-private
- !linux:!win32:!macos:!ios {
+ !linux:!win32:!macos:!ios:!unix: {
qtwebengine_platformError("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.")
} else {
linux:qtwebengine_isLinuxPlatformSupported() {
@@ -125,6 +125,9 @@ defineTest(qtConfTest_detectPlatform) {
}
macos:qtwebengine_isMacOsPlatformSupported() {
$${1}.platform = "macos"
+ }
+ unix:qtwebengine_isLinuxPlatformSupported() {
+ $${1}.platform = "linux"
}
ios:qtwebengine_isMacOsPlatformSupported() {
$${1}.platform = "ios"
@@ -123,6 +123,9 @@ defineTest(qtConfTest_detectPlatform) {
macos:qtwebengine_isMacOsPlatformSupported() {
$${1}.platform = "macos"
}
+ unix:qtwebengine_isLinuxPlatformSupported() {
+ $${1}.platform = "linux"
+ }
ios:qtwebengine_isMacOsPlatformSupported() {
$${1}.platform = "ios"
}

View File

@ -1,14 +1,25 @@
--- mkspecs/features/functions.prf.orig 2019-12-03 07:18:02 UTC
--- mkspecs/features/functions.prf.orig 2020-11-07 01:22:36 UTC
+++ mkspecs/features/functions.prf
@@ -75,6 +75,7 @@ defineReplace(gnArgs) {
linux: include($$QTWEBENGINE_ROOT/src/buildtools/config/linux.pri)
macos: include($$QTWEBENGINE_ROOT/src/buildtools/config/mac_osx.pri)
win32: include($$QTWEBENGINE_ROOT/src/buildtools/config/windows.pri)
+ freebsd: include($$QTWEBENGINE_ROOT/src/buildtools/config/freebsd.pri)
@@ -84,6 +84,10 @@ defineReplace(gnWebEngineArgs) {
include($$QTWEBENGINE_ROOT/src/buildtools/config/windows.pri)
include($$QTWEBENGINE_ROOT/src/core/config/windows.pri)
}
+ freebsd {
+ include($$QTWEBENGINE_ROOT/src/buildtools/config/freebsd.pri)
+ include($$QTWEBENGINE_ROOT/src/core/config/linux.pri)
+ }
isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.)
return($$gn_args)
}
@@ -87,6 +88,7 @@ defineReplace(gnArch) {
@@ -93,6 +97,7 @@ defineReplace(gnPdfArgs) {
macos: include($$QTWEBENGINE_ROOT/src/buildtools/config/mac_osx.pri)
ios: include($$QTWEBENGINE_ROOT/src/pdf/config/ios.pri)
win32: include($$QTWEBENGINE_ROOT/src/buildtools/config/windows.pri)
+ freebsd: include($$QTWEBENGINE_ROOT/src/buildtools/config/freebsd.pri)
include($$QTWEBENGINE_ROOT/src/pdf/config/common.pri)
isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.)
return($$gn_args)
@@ -106,6 +111,7 @@ defineReplace(gnArch) {
contains(qtArch, "arm64"): return(arm64)
contains(qtArch, "mips"): return(mipsel)
contains(qtArch, "mips64"): return(mips64el)
@ -16,7 +27,7 @@
return(unknown)
}
@@ -94,6 +96,7 @@ defineReplace(gnOS) {
@@ -113,6 +119,7 @@ defineReplace(gnOS) {
macos: return(mac)
win32: return(win)
linux: return(linux)

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/BUILD.gn.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/BUILD.gn
@@ -400,7 +400,7 @@ group("gn_all") {
@@ -419,7 +419,7 @@ group("gn_all") {
]
}
@ -9,7 +9,7 @@
deps += [
"//third_party/breakpad:breakpad_unittests",
"//third_party/breakpad:core-2-minidump",
@@ -441,8 +441,6 @@ group("gn_all") {
@@ -460,8 +460,6 @@ group("gn_all") {
"//net:disk_cache_memory_test",
"//net:quic_client",
"//net:quic_server",
@ -18,7 +18,7 @@
"//testing:empty_main",
]
@@ -497,10 +495,6 @@ group("gn_all") {
@@ -516,10 +514,6 @@ group("gn_all") {
"//chrome/test:load_library_perf_tests",
"//chrome/test:sync_performance_tests",
"//chrome/test/chromedriver:chromedriver",
@ -29,7 +29,7 @@
"//media/cast:generate_barcode_video",
"//media/cast:generate_timecode_audio",
"//net:crash_cache",
@@ -567,10 +561,6 @@ group("gn_all") {
@@ -592,10 +586,6 @@ group("gn_all") {
"//mojo:mojo_perftests",
"//services/service_manager/public/cpp",
"//testing/gmock:gmock_main",
@ -40,7 +40,7 @@
]
if (!is_android) {
@@ -644,7 +634,7 @@ group("gn_all") {
@@ -669,7 +659,7 @@ group("gn_all") {
host_os == "win" && !use_qt) {
deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
}
@ -49,7 +49,7 @@
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
}
@@ -783,7 +773,6 @@ group("gn_all") {
@@ -802,7 +792,6 @@ group("gn_all") {
"//chrome/browser/vr:vr_common_perftests",
"//chrome/browser/vr:vr_common_unittests",
"//chrome/browser/vr:vr_pixeltests",
@ -57,15 +57,7 @@
]
if (is_desktop_linux && use_ozone) {
deps += [ "//chrome/browser/vr/testapp:vr_testapp" ]
@@ -902,7 +891,6 @@ if (is_chromeos) {
"//ppapi/examples/video_decode",
"//sandbox/linux:chrome_sandbox",
"//sandbox/linux:sandbox_linux_unittests",
- "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
# Blocked on https://github.com/catapult-project/catapult/issues/2297
#"//third_party/catapult/telemetry:bitmaptools",
@@ -1070,7 +1058,7 @@ if (!is_ios && !use_qt) {
@@ -1085,7 +1074,7 @@ if (!is_ios && !use_qt) {
]
}
@ -74,7 +66,7 @@
data_deps +=
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
}
@@ -1079,7 +1067,7 @@ if (!is_ios && !use_qt) {
@@ -1094,7 +1083,7 @@ if (!is_ios && !use_qt) {
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
@ -83,7 +75,7 @@
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
@@ -1221,9 +1209,6 @@ group("chromium_builder_perf") {
@@ -1286,9 +1275,6 @@ group("chromium_builder_perf") {
if (is_win) {
data_deps += [ "//chrome/installer/mini_installer:mini_installer" ]

View File

@ -1,6 +1,52 @@
--- src/3rdparty/chromium/base/BUILD.gn.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/base/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/BUILD.gn
@@ -1183,7 +1183,7 @@ jumbo_component("base") {
@@ -59,7 +59,7 @@ declare_args() {
# replacement base::Location::Current(). On by default in non-official builds
# for testing purposes.
# TODO(https://crbug.com/974061): remove this eventually.
- from_here_uses_location_builtins = !is_official_build
+ from_here_uses_location_builtins = !is_official_build && !is_bsd
# Unsafe developer build. Has developer-friendly features that may weaken or
# disable security measures like sandboxing or ASLR.
@@ -929,7 +929,7 @@ jumbo_component("base") {
"timer/hi_res_timer_manager_posix.cc",
]
- if (!is_nacl && !is_mac && !is_ios) {
+ if (!is_nacl && !is_mac && !is_ios && !is_bsd) {
sources += [
"profiler/stack_copier_signal.cc",
"profiler/stack_copier_signal.h",
@@ -938,6 +938,12 @@ jumbo_component("base") {
"profiler/thread_delegate_posix.h",
]
}
+
+ if (is_bsd) {
+ sources += [
+ "profiler/stack_sampler_posix.cc",
+ ]
+ }
}
jumbo_excluded_sources = []
@@ -1239,7 +1245,13 @@ jumbo_component("base") {
"process/process_metrics_linux.cc",
"threading/platform_thread_linux.cc",
]
- jumbo_excluded_sources += [ "process/memory_linux.cc" ]
+ # Omit this because it will be excluded via "is_bsd" further down in
+ # this file
+ # jumbo_excluded_sources += [ "process/memory_linux.cc" ]
+ # ...but remove the following files from jumbo merge otherwise it will
+ # emit errors of redefined variables
+ jumbo_excluded_sources += [ "metrics/histogram.cc" ]
+ jumbo_excluded_sources += [ "metrics/sparse_histogram.cc" ]
}
if (!is_nacl) {
@@ -1324,7 +1336,7 @@ jumbo_component("base") {
# Needed for <atomic> if using newer C++ library than sysroot, except if
# building inside the cros_sdk environment - use host_toolchain as a
# more robust check for this.
@ -9,7 +55,7 @@
host_toolchain != "//build/toolchain/cros:host") {
libs += [ "atomic" ]
}
@@ -1209,7 +1209,7 @@ jumbo_component("base") {
@@ -1350,7 +1362,7 @@ jumbo_component("base") {
"allocator/allocator_shim_override_glibc_weak_symbols.h",
]
deps += [ "//base/allocator:tcmalloc" ]
@ -18,7 +64,7 @@
sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
} else if (is_android && use_allocator == "none") {
sources += [
@@ -1749,6 +1749,33 @@ jumbo_component("base") {
@@ -1947,6 +1959,33 @@ jumbo_component("base") {
}
}
@ -51,10 +97,19 @@
+
# iOS
if (is_ios) {
set_sources_assignment_filter([])
@@ -2805,6 +2832,12 @@ test("base_unittests") {
sources -= [
@@ -2903,7 +2942,7 @@ test("base_unittests") {
"posix/unix_domain_socket_unittest.cc",
"task/thread_pool/task_tracker_posix_unittest.cc",
]
set_sources_assignment_filter(sources_assignment_filter)
- if (!is_nacl && !is_mac && !is_ios) {
+ if (!is_nacl && !is_mac && !is_ios && !is_bsd) {
sources += [ "profiler/stack_copier_signal_unittest.cc" ]
}
}
@@ -3092,6 +3131,12 @@ test("base_unittests") {
manifest = "//build/config/fuchsia/tests.cmx"
}
+
+ if (is_bsd) {
@ -63,5 +118,5 @@
+ ]
+ }
if (is_win) {
deps += [ "//base:scoped_handle_test_dll" ]
if (!is_fuchsia && !is_ios) {
sources += [ "files/file_locking_unittest.cc" ]

View File

@ -1,6 +1,16 @@
--- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/debug/elf_reader.cc
@@ -98,6 +98,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base,
@@ -35,7 +35,9 @@ using Nhdr = Elf64_Nhdr;
using Word = Elf64_Word;
#endif
+#if !defined(OS_BSD)
constexpr char kGnuNoteName[] = "GNU";
+#endif
// Returns a pointer to the header of the ELF binary mapped into memory,
// or a null pointer if the header is invalid.
@@ -98,6 +100,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base,
bool found = false;
while (current_section < section_end) {
current_note = reinterpret_cast<const Nhdr*>(current_section);
@ -8,7 +18,7 @@
if (current_note->n_type == NT_GNU_BUILD_ID) {
StringPiece note_name(current_section + sizeof(Nhdr),
current_note->n_namesz);
@@ -107,6 +108,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base,
@@ -107,6 +110,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base,
break;
}
}

View File

@ -1,4 +1,4 @@
--- src/3rdparty/chromium/base/debug/proc_maps_linux.cc.orig 2017-01-26 00:49:07 UTC
--- src/3rdparty/chromium/base/debug/proc_maps_linux.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/debug/proc_maps_linux.cc
@@ -12,7 +12,7 @@
#include "base/strings/string_split.h"
@ -9,3 +9,133 @@
#include <inttypes.h>
#endif
@@ -28,6 +28,11 @@
namespace base {
namespace debug {
+#if defined(OS_BSD)
+const char kProcSelfMapsPath[] = "/proc/curproc/map";
+#else
+const char kProcSelfMapsPath[] = "/proc/self/maps";
+
// Scans |proc_maps| starting from |pos| returning true if the gate VMA was
// found, otherwise returns false.
static bool ContainsGateVMA(std::string* proc_maps, size_t pos) {
@@ -43,15 +48,16 @@ static bool ContainsGateVMA(std::string* proc_maps, si
return false;
#endif
}
+#endif
bool ReadProcMaps(std::string* proc_maps) {
// seq_file only writes out a page-sized amount on each call. Refer to header
// file for details.
const long kReadSize = sysconf(_SC_PAGESIZE);
- base::ScopedFD fd(HANDLE_EINTR(open("/proc/self/maps", O_RDONLY)));
+ base::ScopedFD fd(HANDLE_EINTR(open(kProcSelfMapsPath, O_RDONLY)));
if (!fd.is_valid()) {
- DPLOG(ERROR) << "Couldn't open /proc/self/maps";
+ DPLOG(ERROR) << "Couldn't open " << kProcSelfMapsPath;
return false;
}
proc_maps->clear();
@@ -65,7 +71,7 @@ bool ReadProcMaps(std::string* proc_maps) {
ssize_t bytes_read = HANDLE_EINTR(read(fd.get(), buffer, kReadSize));
if (bytes_read < 0) {
- DPLOG(ERROR) << "Couldn't read /proc/self/maps";
+ DPLOG(ERROR) << "Couldn't read " << kProcSelfMapsPath;
proc_maps->clear();
return false;
}
@@ -76,6 +82,7 @@ bool ReadProcMaps(std::string* proc_maps) {
if (bytes_read == 0)
break;
+#if !defined(OS_BSD)
// The gate VMA is handled as a special case after seq_file has finished
// iterating through all entries in the virtual memory table.
//
@@ -86,6 +93,7 @@ bool ReadProcMaps(std::string* proc_maps) {
// Avoid this by searching for the gate VMA and breaking early.
if (ContainsGateVMA(proc_maps, pos))
break;
+#endif
}
return true;
@@ -114,10 +122,32 @@ bool ParseProcMaps(const std::string& input,
MappedMemoryRegion region;
const char* line = lines[i].c_str();
char permissions[5] = {'\0'}; // Ensure NUL-terminated string.
+ int path_index = 0;
+
+#if defined(OS_BSD)
+ if (lines[i].empty())
+ continue;
+
+
+ char cow;
+
+ // Format:
+ //
+ // start end resident private_resident obj perms ref_count shadow_count flags cow needs_copy type fullpath cred ruid
+ // 0x200000 0x202000 2 6 0xfffff80005be9000 r-- 3 1 0x1000 COW NC vnode /bin/cat NCH -1
+ //
+ if (sscanf(line, "%" SCNxPTR " %" SCNxPTR " %*ld %*ld %*llx %3c %*d %*d %*x %c%*s %*s %*s %n",
+ &region.start, &region.end, permissions, &cow, &path_index) < 4) {
+ DPLOG(WARNING) << "sscanf failed for line: " << line;
+ return false;
+ }
+
+ const char* fullpath = line + path_index;
+ const char* cred = strchr(fullpath, ' ');
+#else
uint8_t dev_major = 0;
uint8_t dev_minor = 0;
long inode = 0;
- int path_index = 0;
// Sample format from man 5 proc:
//
@@ -133,6 +163,7 @@ bool ParseProcMaps(const std::string& input,
DPLOG(WARNING) << "sscanf failed for line: " << line;
return false;
}
+#endif
region.permissions = 0;
@@ -151,14 +182,31 @@ bool ParseProcMaps(const std::string& input,
else if (permissions[2] != '-')
return false;
+#if defined(OS_BSD)
+ if (cow == 'C') {
+ region.permissions |= MappedMemoryRegion::PRIVATE;
+ } else if (cow != 'N') {
+ DPLOG(WARNING) << "unknown value for COW in line " << line << ": " << cow;
+ return false;
+ }
+#else
if (permissions[3] == 'p')
region.permissions |= MappedMemoryRegion::PRIVATE;
else if (permissions[3] != 's' && permissions[3] != 'S') // Shared memory.
return false;
+#endif
// Pushing then assigning saves us a string copy.
regions.push_back(region);
+#if defined(OS_BSD)
+ if (cred != nullptr) {
+ regions.back().path.assign(line + path_index, cred - fullpath);
+ } else {
+ regions.back().path.assign(line + path_index);
+ }
+#else
regions.back().path.assign(line + path_index);
+#endif
}
regions_out->swap(regions);

View File

@ -1,4 +1,4 @@
--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc
@@ -35,7 +35,7 @@
#include <AvailabilityMacros.h>
@ -9,23 +9,15 @@
#include "base/debug/proc_maps_linux.h"
#endif
@@ -653,6 +653,11 @@ class SandboxSymbolizeHelper {
// for the modules that are loaded in the current process.
// Returns true on success.
bool CacheMemoryRegions() {
@@ -697,7 +697,11 @@ class SandboxSymbolizeHelper {
// Skip regions with empty file names.
continue;
}
+#if defined(OS_BSD)
+ // TODO (rene) avoid link error, implement something?
+ NOTIMPLEMENTED();
+ return false;
+#else
// Reads /proc/self/maps.
std::string contents;
if (!ReadProcMaps(&contents)) {
@@ -670,6 +675,7 @@ class SandboxSymbolizeHelper {
is_initialized_ = true;
return true;
+ if (region.path[0] == '-') {
+#else
if (region.path[0] == '[') {
+#endif
}
// Opens all object files and caches their file descriptors.
// Skip pseudo-paths, like [stack], [vdso], [heap], etc ...
continue;
}

View File

@ -1,11 +1,15 @@
--- src/3rdparty/chromium/base/files/file_path_watcher.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/base/files/file_path_watcher.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/files/file_path_watcher.cc
@@ -20,7 +20,7 @@ FilePathWatcher::~FilePathWatcher() {
@@ -20,10 +20,10 @@ FilePathWatcher::~FilePathWatcher() {
// static
bool FilePathWatcher::RecursiveWatchAvailable() {
#if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) || \
- defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
+ defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
+ (defined(OS_LINUX) && !defined(OS_BSD)) || defined(OS_ANDROID) || defined(OS_AIX)
return true;
#else
// FSEvents isn't available on iOS.
- // FSEvents isn't available on iOS.
+ // FSEvents isn't available on iOS and the kqueue watcher.
return false;
#endif
}

View File

@ -1,34 +1,41 @@
--- src/3rdparty/chromium/base/files/file_path_watcher_stub.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/base/files/file_path_watcher_stub.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/files/file_path_watcher_stub.cc
@@ -5,10 +5,14 @@
// This file exists for Unix systems which don't have the inotify headers, and
// thus cannot build file_watcher_inotify.cc
@@ -1,14 +1,15 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file exists for Unix systems which don't have the inotify headers, and
-// thus cannot build file_watcher_inotify.cc
-#include "base/files/file_path_watcher.h"
+#include <memory>
+
#include "base/files/file_path_watcher.h"
+#include "base/files/file_path_watcher_kqueue.h"
+#include "base/files/file_path_watcher.h"
+#include "base/files/file_path_watcher_kqueue.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
+#include "build/build_config.h"
namespace base {
@@ -22,12 +26,26 @@ class FilePathWatcherImpl : public FilePathWatcher::Pl
@@ -22,12 +23,29 @@ class FilePathWatcherImpl : public FilePathWatcher::Pl
bool Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) override {
- return false;
+#if defined(OS_BSD)
+ DCHECK(!impl_.get());
+ if (recursive) {
+ if (!FilePathWatcher::RecursiveWatchAvailable())
+ return false;
+ return false;
+ } else {
+ impl_ = std::make_unique<FilePathWatcherKQueue>();
+ impl_ = std::make_unique<FilePathWatcherKQueue>();
+ }
+ DCHECK(impl_.get());
+ return impl_->Watch(path, recursive, callback);
+#else
return false;
+#endif
}
- void Cancel() override {}

View File

@ -1,20 +1,20 @@
--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/base/i18n/icu_util.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/i18n/icu_util.cc
@@ -43,7 +43,7 @@
@@ -49,7 +49,7 @@
#endif
#if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
- (defined(OS_LINUX) && !defined(IS_CHROMECAST))
+ (defined(OS_LINUX) && !defined(IS_CHROMECAST)) || defined(OS_BSD)
- (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST))
+ (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) || defined(OS_BSD)
#include "third_party/icu/source/i18n/unicode/timezone.h"
#endif
@@ -293,7 +293,7 @@ void InitializeIcuTimeZone() {
@@ -345,7 +345,7 @@ void InitializeIcuTimeZone() {
fuchsia::IntlProfileWatcher::GetPrimaryTimeZoneIdForIcuInitialization();
icu::TimeZone::adoptDefault(
icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(zone_id)));
-#elif defined(OS_LINUX) && !defined(IS_CHROMECAST)
+#elif (defined(OS_LINUX) && !defined(IS_CHROMECAST)) || defined(OS_BSD)
// To respond to the timezone change properly, the default timezone
-#elif defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)
+#elif (defined(OS_LINUX) || defined(OS_BSD)) && !BUILDFLAG(IS_CHROMECAST)
// To respond to the time zone change properly, the default time zone
// cache in ICU has to be populated on starting up.
// See TimeZoneMonitorLinux::NotifyClientsFromImpl().

View File

@ -1,20 +1,12 @@
--- src/3rdparty/chromium/base/linux_util.cc.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/base/linux_util.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/linux_util.cc
@@ -144,6 +144,8 @@ char g_linux_distro[kDistroSize] =
"CrOS";
#elif defined(OS_ANDROID)
"Android";
+#elif defined(OS_BSD)
+ "BSD";
#else // if defined(OS_LINUX)
"Unknown";
#endif
@@ -164,7 +166,7 @@ BASE_EXPORT std::string GetKeyValueFromOSReleaseFileFo
}
std::string GetLinuxDistro() {
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
return g_linux_distro;
#elif defined(OS_LINUX)
LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
@@ -78,6 +78,9 @@ class DistroNameGetter {
public:
DistroNameGetter() {
static const char* const kFilesToCheck[] = {"/etc/os-release",
+#if defined(OS_BSD)
+ "%%LOCALBASE%%/etc/os-release",
+#endif
"/usr/lib/os-release"};
for (const char* file : kFilesToCheck) {
if (ReadDistroFromOSReleaseFile(file))

View File

@ -0,0 +1,63 @@
--- src/3rdparty/chromium/base/memory/discardable_memory.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/memory/discardable_memory.cc
@@ -23,7 +23,7 @@ const base::Feature kMadvFreeDiscardableMemory{
"MadvFreeDiscardableMemory", base::FEATURE_DISABLED_BY_DEFAULT};
#endif // defined(OS_POSIX)
-#if defined(OS_ANDROID) || defined(OS_LINUX)
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
const base::Feature kDiscardableMemoryBackingTrial{
"DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT};
@@ -41,13 +41,13 @@ const base::FeatureParam<DiscardableMemoryTrialGroup>
DiscardableMemoryTrialGroup::kEmulatedSharedMemory,
&kDiscardableMemoryBackingParamOptions};
-#endif // defined(OS_ANDROID) || defined(OS_LINUX)
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
} // namespace features
namespace {
-#if defined(OS_ANDROID) || defined(OS_LINUX)
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
DiscardableMemoryBacking GetBackingForFieldTrial() {
DiscardableMemoryTrialGroup trial_group =
@@ -61,11 +61,11 @@ DiscardableMemoryBacking GetBackingForFieldTrial() {
}
NOTREACHED();
}
-#endif // defined(OS_ANDROID) || defined(OS_LINUX)
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
} // namespace
-#if defined(OS_ANDROID) || defined(OS_LINUX)
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
// Probe capabilities of this device to determine whether we should participate
// in the discardable memory backing trial.
@@ -87,18 +87,18 @@ DiscardableMemoryTrialGroup GetDiscardableMemoryBackin
DCHECK(DiscardableMemoryBackingFieldTrialIsEnabled());
return features::kDiscardableMemoryBackingParam.Get();
}
-#endif // defined(OS_ANDROID) || defined(OS_LINUX)
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
DiscardableMemory::DiscardableMemory() = default;
DiscardableMemory::~DiscardableMemory() = default;
DiscardableMemoryBacking GetDiscardableMemoryBacking() {
-#if defined(OS_ANDROID) || defined(OS_LINUX)
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
if (DiscardableMemoryBackingFieldTrialIsEnabled()) {
return GetBackingForFieldTrial();
}
-#endif // defined(OS_ANDROID) || defined(OS_LINUX)
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
#if defined(OS_ANDROID)
if (ashmem_device_is_supported())

View File

@ -0,0 +1,19 @@
--- src/3rdparty/chromium/base/memory/discardable_memory_internal.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/memory/discardable_memory_internal.h
@@ -10,7 +10,7 @@
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"
-#if defined(OS_ANDROID) || defined(OS_LINUX)
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
namespace base {
@@ -47,6 +47,6 @@ GetDiscardableMemoryBackingFieldTrialGroup();
} // namespace base
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
#endif // BASE_MEMORY_DISCARDABLE_MEMORY_INTERNAL_H_

View File

@ -1,16 +1,97 @@
--- src/3rdparty/chromium/base/process/internal_linux.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/base/process/internal_linux.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/process/internal_linux.cc
@@ -60,10 +60,13 @@ bool ReadProcFile(const FilePath& file, std::string* b
// Synchronously reading files in /proc is safe.
ThreadRestrictions::ScopedAllowIO allow_io;
@@ -29,7 +29,11 @@ namespace internal {
+#if !defined(OS_BSD)
if (!ReadFileToString(file, buffer)) {
const char kProcDir[] = "/proc";
+#if defined(OS_BSD)
+const char kStatFile[] = "status";
+#else
const char kStatFile[] = "stat";
+#endif
FilePath GetProcPidDir(pid_t pid) {
return FilePath(kProcDir).Append(NumberToString(pid));
@@ -64,6 +68,7 @@ bool ReadProcFile(const FilePath& file, std::string* b
DLOG(WARNING) << "Failed to read " << file.MaybeAsASCII();
return false;
}
+#endif
+
return !buffer->empty();
}
@@ -79,6 +84,22 @@ bool ParseProcStats(const std::string& stats_data,
if (stats_data.empty())
return false;
+#if defined(OS_BSD)
+ proc_stats->clear();
+
+ std::vector<std::string> other_stats = SplitString(
+ stats_data, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+
+ for (const auto& i : other_stats) {
+ auto pos = i.find(',');
+
+ if (pos == std::string::npos) {
+ proc_stats->push_back(i);
+ } else {
+ proc_stats->push_back(i.substr(0, pos));
+ }
+ }
+#else
// The stat file is formatted as:
// pid (process name) data1 data2 .... dataN
// Look for the closing paren by scanning backwards, to avoid being fooled by
@@ -108,6 +129,7 @@ bool ParseProcStats(const std::string& stats_data,
base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
for (const auto& i : other_stats)
proc_stats->push_back(i);
+#endif
return true;
}
@@ -155,7 +177,11 @@ int64_t ReadProcStatsAndGetFieldAsInt64(pid_t pid, Pro
}
int64_t ReadProcSelfStatsAndGetFieldAsInt64(ProcStatsFields field_num) {
+#if defined(OS_BSD)
+ FilePath stat_file = FilePath(kProcDir).Append("curproc").Append(kStatFile);
+#else
FilePath stat_file = FilePath(kProcDir).Append("self").Append(kStatFile);
+#endif
return ReadStatFileAndGetFieldAsInt64(stat_file, field_num);
}
@@ -171,6 +197,9 @@ size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid,
}
Time GetBootTime() {
+#if defined(OS_BSD)
+ return Time();
+#else
FilePath path("/proc/stat");
std::string contents;
if (!ReadProcFile(path, &contents))
@@ -184,9 +213,13 @@ Time GetBootTime() {
if (!StringToInt(btime_it->second, &btime))
return Time();
return Time::FromTimeT(btime);
+#endif
}
TimeDelta GetUserCpuTimeSinceBoot() {
+#if defined(OS_BSD)
+ return TimeDelta();
+#else
FilePath path("/proc/stat");
std::string contents;
if (!ReadProcFile(path, &contents))
@@ -210,6 +243,7 @@ TimeDelta GetUserCpuTimeSinceBoot() {
return TimeDelta();
return ClockTicksToTimeDelta(user + nice);
+#endif
}
TimeDelta ClockTicksToTimeDelta(int clock_ticks) {

View File

@ -1,4 +1,4 @@
--- src/3rdparty/chromium/base/process/internal_linux.h.orig 2017-01-26 00:49:07 UTC
--- src/3rdparty/chromium/base/process/internal_linux.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/process/internal_linux.h
@@ -14,6 +14,8 @@
@ -9,3 +9,26 @@
namespace base {
class Time;
@@ -50,6 +52,14 @@ bool ParseProcStats(const std::string& stats_data,
// If the ordering ever changes, carefully review functions that use these
// values.
enum ProcStatsFields {
+#if defined(OS_BSD)
+ VM_COMM = 0, // Command name.
+ VM_PPID = 2, // Parent process id.
+ VM_PGRP = 3, // Process group id.
+ VM_STARTTIME = 7, // The process start time.
+ VM_UTIME = 8, // The user time.
+ VM_STIME = 9, // The system time
+#else
VM_COMM = 1, // Filename of executable, without parentheses.
VM_STATE = 2, // Letter indicating the state of the process.
VM_PPID = 3, // PID of the parent.
@@ -62,6 +72,7 @@ enum ProcStatsFields {
VM_STARTTIME = 21, // The time the process started in clock ticks.
VM_VSIZE = 22, // Virtual memory size in bytes.
VM_RSS = 23, // Resident Set Size in pages.
+#endif
};
// Reads the |field_num|th field from |proc_stats|. Returns 0 on failure.

View File

@ -1,14 +1,27 @@
--- src/3rdparty/chromium/base/process/process_linux.cc.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/base/process/process_linux.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/process/process_linux.cc
@@ -88,6 +88,7 @@ Time Process::CreationTime() const {
@@ -79,6 +79,9 @@ Time Process::CreationTime() const {
internal::VM_STARTTIME)
: internal::ReadProcStatsAndGetFieldAsInt64(
Pid(), internal::VM_STARTTIME);
+#if defined(OS_BSD)
+ return Time::FromTimeT(start_ticks);
+#else
if (!start_ticks)
return Time();
TimeDelta start_offset = internal::ClockTicksToTimeDelta(start_ticks);
@@ -86,8 +89,10 @@ Time Process::CreationTime() const {
if (boot_time.is_null())
return Time();
return Time(boot_time + start_offset);
+#endif
}
+#if !defined(OS_BSD)
// static
bool Process::CanBackgroundProcesses() {
#if defined(OS_CHROMEOS)
@@ -139,6 +140,7 @@ bool Process::SetProcessBackgrounded(bool background)
@@ -139,6 +144,7 @@ bool Process::SetProcessBackgrounded(bool background)
DPCHECK(result == 0);
return result == 0;
}

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/base/profiler/stack_copier_signal.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/base/profiler/stack_copier_signal.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/profiler/stack_copier_signal.cc
@@ -4,10 +4,16 @@
@@ -4,7 +4,14 @@
#include "base/profiler/stack_copier_signal.h"
@ -14,11 +14,8 @@
+#endif
#include <signal.h>
#include <sys/ucontext.h>
-#include <syscall.h>
#include <atomic>
@@ -35,8 +41,13 @@ class AsyncSafeWaitableEvent {
#include <syscall.h>
@@ -33,8 +40,13 @@ class AsyncSafeWaitableEvent {
// for a pthread mutex. So, also check the condition.
while (true) {
int res =
@ -32,7 +29,7 @@
if (futex_.load(std::memory_order_acquire) != 0)
return true;
if (res != 0)
@@ -46,8 +57,12 @@ class AsyncSafeWaitableEvent {
@@ -44,8 +56,12 @@ class AsyncSafeWaitableEvent {
void Signal() {
futex_.store(1, std::memory_order_release);
@ -45,7 +42,7 @@
}
private:
@@ -201,11 +216,17 @@ bool StackCopierSignal::CopyStack(StackBuffer* stack_b
@@ -215,11 +231,18 @@ bool StackCopierSignal::CopyStack(StackBuffer* stack_b
if (!scoped_sigaction.succeeded())
return false;
@ -57,6 +54,7 @@
}
+#elif defined(OS_FREEBSD)
+ if (thr_kill2(getpid(), thread_delegate_->GetThreadId(), SIGURG) != 0) {
+ NOTREACHED();
+ return false;
+ }
+#endif

View File

@ -1,16 +1,16 @@
--- src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/profiler/thread_delegate_posix.cc
@@ -3,6 +3,9 @@
// found in the LICENSE file.
@@ -9,6 +9,9 @@
#include "base/stl_util.h"
#include <pthread.h>
+#if defined(__FreeBSD__)
#include "build/build_config.h"
+#if defined(OS_FREEBSD)
+#include <pthread_np.h>
+#endif
#include "base/process/process_handle.h"
#include "base/profiler/thread_delegate_posix.h"
@@ -17,12 +20,20 @@ namespace {
namespace base {
@@ -17,7 +20,12 @@ namespace {
uintptr_t GetThreadStackBaseAddressImpl(
SamplingProfilerThreadToken thread_token) {
pthread_attr_t attr;
@ -23,27 +23,25 @@
// See crbug.com/617730 for limitations of this approach on Linux.
void* address;
size_t size;
pthread_attr_getstack(&attr, &address, &size);
const uintptr_t base_address = reinterpret_cast<uintptr_t>(address) + size;
@@ -93,16 +101,33 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
return {
// Return the set of callee-save registers per the i386 System V ABI
// section 2.2.3, plus the stack pointer.
+#if defined(OS_FREEBSD)
+ pthread_attr_destroy(&attr);
+ reinterpret_cast<uintptr_t*>(&thread_context->mc_ebx),
+ reinterpret_cast<uintptr_t*>(&thread_context->mc_ebp),
+ reinterpret_cast<uintptr_t*>(&thread_context->mc_esi),
+ reinterpret_cast<uintptr_t*>(&thread_context->mc_edi),
+ reinterpret_cast<uintptr_t*>(&thread_context->mc_esp),
+#else
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_EBX]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_EBP]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_ESI]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_EDI]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_ESP]),
+#endif
return base_address;
}
@@ -84,15 +95,23 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
registers.reserve(12);
// Return the set of callee-save registers per the ARM 64-bit Procedure Call
// Standard section 5.1.1, plus the stack pointer.
- registers.push_back(reinterpret_cast<uintptr_t*>(&thread_context->sp));
+ registers.push_back(reinterpret_cast<uintptr_t*>(&thread_context->mc_gpregs.gp_sp));
for (size_t i = 19; i <= 29; ++i)
- registers.push_back(reinterpret_cast<uintptr_t*>(&thread_context->regs[i]));
+ registers.push_back(reinterpret_cast<uintptr_t*>(&thread_context->mc_gpregs.gp_x[i]));
return registers;
-#elif defined(ARCH_CPU_X86_64) // #if defined(ARCH_CPU_ARM_FAMILY) &&
- // defined(ARCH_CPU_32_BITS)
+#elif defined(ARCH_CPU_X86_64)
};
#elif defined(ARCH_CPU_X86_FAMILY) && defined(ARCH_CPU_64_BITS)
return {
// Return the set of callee-save registers per the x86-64 System V ABI
// section 3.2.1, plus the stack pointer.
@ -59,7 +57,7 @@
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_RBP]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_RBX]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_R12]),
@@ -100,6 +119,7 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
@@ -110,6 +135,7 @@ std::vector<uintptr_t*> ThreadDelegatePosix::GetRegist
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_R14]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_R15]),
reinterpret_cast<uintptr_t*>(&thread_context->gregs[REG_RSP]),

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/base/system/sys_info.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/system/sys_info.cc
@@ -102,7 +102,7 @@ void SysInfo::GetHardwareInfo(base::OnceCallback<void(
#elif defined(OS_ANDROID) || defined(OS_MACOSX)
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {}, base::BindOnce(&GetHardwareInfoSync), std::move(callback));
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {base::MayBlock()}, base::BindOnce(&GetHardwareInfoSync),
std::move(callback));

View File

@ -1,6 +1,11 @@
--- src/3rdparty/chromium/base/system/sys_info_freebsd.cc.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/base/system/sys_info_freebsd.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/system/sys_info_freebsd.cc
@@ -13,26 +13,59 @@
@@ -9,30 +9,76 @@
#include <sys/sysctl.h>
#include "base/logging.h"
+#include "base/strings/string_util.h"
namespace base {
int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
@ -62,6 +67,17 @@
}
+
return static_cast<uint64_t>(limit);
+}
+
+SysInfo::HardwareInfo SysInfo::GetHardwareInfoSync() {
+ HardwareInfo info;
+ // Set the manufacturer to "FreeBSD" and the model to
+ // an empty string.
+ info.manufacturer = "FreeBSD";
+ info.model = HardwareModelName();
+ DCHECK(IsStringUTF8(info.manufacturer));
+ DCHECK(IsStringUTF8(info.model));
+ return info;
}
-
} // namespace base

View File

@ -1,15 +1,15 @@
--- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
@@ -18,7 +18,7 @@
@@ -17,6 +17,8 @@
#if defined(OS_MACOSX)
#include <malloc/malloc.h>
#else
-#include <malloc.h>
+#elif defined(OS_BSD)
+#include <stdlib.h>
#else
#include <malloc.h>
#endif
#if defined(OS_WIN)
#include <windows.h>
@@ -132,6 +132,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
@@ -132,6 +134,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
}
#elif defined(OS_FUCHSIA)
// TODO(fuchsia): Port, see https://crbug.com/706592.
@ -18,4 +18,4 @@
+ allocated_objects_size = 0;
#else
struct mallinfo info = mallinfo();
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
// In case of Android's jemalloc |arena| is 0 and the outer pages size is

View File

@ -1,24 +1,24 @@
--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -60,7 +60,7 @@ declare_args() {
# only two architectures that are currently checked in). Turn this off when
# you are using a custom toolchain and need to control -B in cflags.
linux_use_bundled_binutils =
- linux_use_bundled_binutils_override && is_linux &&
+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
(current_cpu == "x64" || current_cpu == "x86")
binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
root_build_dir)
@@ -309,7 +309,7 @@ config("compiler") {
@@ -144,7 +144,7 @@ declare_args() {
# 'is_android' breaks content_shell_test_apk on android-kitkat-arm-rel.
# 'use_xcode_clang' may call old clang.
init_stack_vars =
- !is_android && !use_xcode_clang && (!is_official_build || is_linux)
+ !is_android && !use_xcode_clang && (!is_official_build || is_linux) && !is_bsd
# This argument is to control whether enabling text section splitting in the
# final binary. When enabled, the separated text sections with prefix
@@ -313,7 +313,7 @@ config("compiler") {
}
# Linker warnings.
if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
- !is_mac && !is_ios && current_os != "aix") {
+ !is_mac && !is_ios && current_os != "aix" && !is_bsd) {
# TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
- if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") {
+ if (fatal_linker_warnings && !is_mac && !is_ios && !is_bsd && current_os != "aix") {
ldflags += [ "-Wl,--fatal-warnings" ]
}
@@ -416,7 +416,7 @@ config("compiler") {
if (fatal_linker_warnings && (is_mac || is_ios)) {
@@ -419,7 +419,7 @@ config("compiler") {
# Compiler instrumentation can introduce dependencies in DSOs to symbols in
# the executable they are loaded into, so they are unresolved at link-time.
@ -27,8 +27,8 @@
ldflags += [
"-Wl,-z,defs",
"-Wl,--as-needed",
@@ -516,7 +516,7 @@ config("compiler") {
}
@@ -518,7 +518,7 @@ config("compiler") {
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
}
- if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) {
@ -36,7 +36,7 @@
cflags += [ "-fcrash-diagnostics-dir=" +
rebase_path("//tools/clang/crashreports", root_build_dir) ]
@@ -787,7 +787,7 @@ config("compiler_cpu_abi") {
@@ -789,7 +789,7 @@ config("compiler_cpu_abi") {
cflags += [ "-mtune=$arm_tune" ]
}
} else if (current_cpu == "arm64") {
@ -45,7 +45,7 @@
cflags += [ "--target=aarch64-linux-gnu" ]
ldflags += [ "--target=aarch64-linux-gnu" ]
}
@@ -1138,7 +1138,7 @@ config("compiler_deterministic") {
@@ -1139,7 +1139,7 @@ config("compiler_deterministic") {
"-Xclang",
".",
]
@ -54,7 +54,7 @@
# We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
}
@@ -1545,7 +1545,7 @@ config("default_warnings") {
@@ -1541,7 +1541,7 @@ config("default_warnings") {
cflags += [ "-Wno-nonportable-include-path" ]
}
@ -63,7 +63,7 @@
# Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
# recognize.
cflags += [
@@ -1775,7 +1775,7 @@ config("thin_archive") {
@@ -1791,7 +1791,7 @@ config("thin_archive") {
# Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't
# have a "thin archive" mode (it does accept -T, but it means truncating
# archive names to 16 characters, which is not what we want).
@ -72,7 +72,7 @@
arflags = [ "-T" ]
} else if (is_win && use_lld) {
arflags = [ "/llvmlibthin" ]
@@ -2373,7 +2373,7 @@ config("symbols") {
@@ -2323,7 +2323,7 @@ config("symbols") {
# flag, so we can use use -g1 for pnacl and nacl-clang compiles.
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
if (!is_nacl || is_clang) {
@ -80,8 +80,8 @@
+ cflags += [ "-g0" ]
}
if (use_debug_fission && !is_nacl && !is_android) {
@@ -2394,7 +2394,7 @@ config("symbols") {
if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) {
@@ -2351,7 +2351,7 @@ config("symbols") {
# DWARF info may be corrupt; offsets in a range list entry are in different
# sections" there. Maybe just a bug in nacl_switch_32.S.
if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" &&

View File

@ -1,6 +1,15 @@
--- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/build/config/compiler/compiler.gni.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/build/config/compiler/compiler.gni
@@ -181,7 +181,7 @@ declare_args() {
@@ -47,7 +47,7 @@ declare_args() {
# only two architectures that are currently checked in). Turn this off when
# you are using a custom toolchain and need to control -B in cflags.
linux_use_bundled_binutils =
- linux_use_bundled_binutils_override && is_linux &&
+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
(current_cpu == "x64" || current_cpu == "x86")
binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
root_build_dir)
@@ -193,7 +193,7 @@ declare_args() {
declare_args() {
# Whether to use the gold linker from binutils instead of lld or bfd.
use_gold =

View File

@ -1,9 +1,9 @@
--- src/3rdparty/chromium/build/config/linux/BUILD.gn.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/build/config/linux/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/build/config/linux/BUILD.gn
@@ -28,7 +28,7 @@ config("runtime_library") {
}
@@ -30,7 +30,7 @@ config("runtime_library") {
if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") &&
if ((!(is_chromeos || chromeos_is_browser_only) ||
default_toolchain != "//build/toolchain/cros:target") &&
- (!use_custom_libcxx || current_cpu == "mipsel") && !use_qt) {
+ (!use_custom_libcxx || current_cpu == "mipsel") && !use_qt && !is_bsd) {
libs = [ "atomic" ]

View File

@ -1,15 +1,14 @@
--- src/3rdparty/chromium/build/config/sysroot.gni.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/build/config/sysroot.gni.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/build/config/sysroot.gni
@@ -15,9 +15,10 @@ declare_args() {
# The absolute path to directory containing linux sysroot images
target_sysroot_dir = "//build/linux"
@@ -24,9 +24,9 @@ declare_args() {
# Controls default is_linux sysroot. If set to true, and sysroot
# is empty, default sysroot is calculated.
- use_sysroot = current_cpu == "x86" || current_cpu == "x64" ||
+ use_sysroot = !is_bsd && (
+ current_cpu == "x86" || current_cpu == "x64" ||
+ use_sysroot = !is_bsd && (current_cpu == "x86" || current_cpu == "x64" ||
current_cpu == "arm" || current_cpu == "arm64" ||
- current_cpu == "mipsel" || current_cpu == "mips64el"
+ current_cpu == "mipsel" || current_cpu == "mips64el")
}
if (current_os == target_os && current_cpu == target_cpu &&
if (sysroot == "") {

View File

@ -1,53 +0,0 @@
--- src/3rdparty/chromium/build/linux/unbundle/libxml.gn.orig 2020-04-08 09:41:36 UTC
+++ src/3rdparty/chromium/build/linux/unbundle/libxml.gn
@@ -8,11 +8,48 @@ pkg_config("system_libxml") {
packages = [ "libxml-2.0" ]
}
-static_library("libxml") {
+source_set("libxml") {
+ public_configs = [ ":system_libxml" ]
+}
+
+static_library("libxml_utils") {
+ # Do not expand this visibility list without first consulting with the
+ # Security Team.
+ visibility = [
+ ":xml_reader",
+ ":xml_writer",
+ "//base/test:test_support",
+ "//services/data_decoder:xml_parser_fuzzer",
+ ]
sources = [
"chromium/libxml_utils.cc",
"chromium/libxml_utils.h",
]
-
public_configs = [ ":system_libxml" ]
+}
+
+static_library("xml_reader") {
+ # Do not expand this visibility list without first consulting with the
+ # Security Team.
+ visibility = [
+ "//base/test:test_support",
+ "//components/policy/core/common:unit_tests",
+ "//services/data_decoder:*",
+ "//tools/traffic_annotation/auditor:auditor_sources",
+ ]
+ sources = [
+ "chromium/xml_reader.cc",
+ "chromium/xml_reader.h",
+ ]
+ deps = [ ":libxml_utils" ]
+}
+
+static_library("xml_writer") {
+ # The XmlWriter is considered safe to use from any target.
+ visibility = [ "*" ]
+ sources = [
+ "chromium/xml_writer.cc",
+ "chromium/xml_writer.h",
+ ]
+ deps = [ ":libxml_utils" ]
}

View File

@ -1,8 +1,8 @@
--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni
@@ -47,6 +47,11 @@ analyzer_wrapper =
rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py",
root_build_dir) + " --mode=clang"
@@ -36,6 +36,11 @@ if (is_linux && target_os == "android") {
enable_resource_whitelist_generation = false
}
+declare_args() {
+ extra_cxxflags = ""
@ -12,7 +12,7 @@
# This template defines a toolchain for something that works like gcc
# (including clang).
#
@@ -610,13 +615,24 @@ template("clang_toolchain") {
@@ -589,13 +594,23 @@ template("clang_toolchain") {
}
gcc_toolchain(target_name) {
@ -24,8 +24,7 @@
- ar = "${prefix}/llvm-ar"
- nm = "${toolprefix}nm"
+ if (is_bsd) {
+ # XXX fix the hardcoding!
+ prefix = "/usr/local/bin"
+ prefix = "%%LOCALBASE%%/bin"
+ cc = "cc"
+ cxx = "c++"
+ ld = cxx

View File

@ -1,21 +1,19 @@
--- src/3rdparty/chromium/cc/BUILD.gn.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/cc/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/cc/BUILD.gn
@@ -568,7 +568,7 @@ cc_test_static_library("test_support") {
@@ -589,7 +589,7 @@ cc_test_static_library("test_support") {
if (enable_vulkan) {
deps += [ "//gpu/vulkan/init" ]
}
- if (!is_android) {
+ if (!is_android && !is_bsd) {
data_deps = [
"//third_party/mesa_headers",
]
@@ -773,9 +773,6 @@ cc_test("cc_unittests") {
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl:test_support",
- ]
- data_deps = [
data_deps = [ "//third_party/mesa_headers" ]
}
}
@@ -790,7 +790,6 @@ cc_test("cc_unittests") {
]
data_deps = [
"//testing/buildbot/filters:cc_unittests_filters",
- "//third_party/mesa_headers",
]
if (enable_vulkan) {
defines = []

View File

@ -1,15 +1,15 @@
--- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/chrome/app/chromium_strings.grd.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/chrome/app/chromium_strings.grd
@@ -690,7 +690,7 @@ Signing in anyway will merge Chromium information like
@@ -680,7 +680,7 @@ Chromium is unable to recover your settings.
</if>
<!-- about:browser-switch strings -->
- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
+ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
- <if expr="is_win or is_macosx or (is_linux and not chromeos)">
+ <if expr="is_win or is_macosx or (is_posix and not chromeos)">
<message name="IDS_ABOUT_BROWSER_SWITCH_DESCRIPTION_UNKNOWN_BROWSER" desc="Description shown while waiting for an alternative browser to open, when the browser name is not auto-detected">
Your system administrator has configured Chromium to open an alternative browser to access <ph name="TARGET_URL_HOSTNAME">$1<ex>example.com</ex></ph>.
</message>
@@ -821,7 +821,7 @@ Signing in anyway will merge Chromium information like
@@ -781,7 +781,7 @@ Chromium is unable to recover your settings.
</message>
<!-- ProcessSingleton -->
@ -18,7 +18,7 @@
<message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
The profile appears to be in use by another Chromium process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.
</message>
@@ -1080,7 +1080,7 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2
@@ -1003,7 +1003,7 @@ Chromium is unable to recover your settings.
</message>
<!-- Plugin Placeholders -->

View File

@ -1,15 +1,15 @@
--- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/chrome/app/generated_resources.grd.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/chrome/app/generated_resources.grd
@@ -4796,7 +4796,7 @@ Keep your key file in a safe place. You will need it t
@@ -5137,7 +5137,7 @@ Keep your key file in a safe place. You will need it t
</if>
<!-- chrome://browser-switch strings -->
- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
+ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
- <if expr="is_win or is_macosx or (is_linux and not chromeos)">
+ <if expr="is_win or is_macosx or (is_posix and not chromeos)">
<message name="IDS_ABOUT_BROWSER_SWITCH_TITLE" desc="about:browser-switch page title">
Legacy Browser Support
</message>
@@ -6373,7 +6373,7 @@ the Bookmarks menu.">
@@ -6880,7 +6880,7 @@ the Bookmarks menu.">
Google Pay
</message>
@ -18,7 +18,7 @@
<message name="IDS_SHOW_WINDOW_DECORATIONS" desc="The label of a radio button in the options dialog for using the system title bar and borders.">
Use system title bar and borders
</message>
@@ -7222,7 +7222,7 @@ Please help our engineers fix this problem. Tell us wh
@@ -7806,7 +7806,7 @@ Please help our engineers fix this problem. Tell us wh
Set as default
</message>

View File

@ -1,15 +1,15 @@
--- src/3rdparty/chromium/chrome/app/google_chrome_strings.grd.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/chrome/app/google_chrome_strings.grd.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/chrome/app/google_chrome_strings.grd
@@ -702,7 +702,7 @@ Signing in anyway will merge Chrome information like b
@@ -692,7 +692,7 @@ Google Chrome is unable to recover your settings.
</if>
<!-- about:browser-switch strings -->
- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
+ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
- <if expr="is_win or is_macosx or (is_linux and not chromeos)">
+ <if expr="is_win or is_macosx or (is_posix and not chromeos)">
<message name="IDS_ABOUT_BROWSER_SWITCH_DESCRIPTION_UNKNOWN_BROWSER" desc="Description shown while waiting for an alternative browser to open, when the browser name is not auto-detected">
Your system administrator has configured Google Chrome to open an alternative browser to access <ph name="TARGET_URL_HOSTNAME">$1<ex>example.com</ex></ph>.
</message>
@@ -833,7 +833,7 @@ Signing in anyway will merge Chrome information like b
@@ -793,7 +793,7 @@ Google Chrome is unable to recover your settings.
</message>
<!-- ProcessSingleton -->
@ -18,7 +18,7 @@
<message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
The profile appears to be in use by another Google Chrome process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome.
</message>
@@ -1099,7 +1099,7 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2
@@ -1022,7 +1022,7 @@ Google Chrome is unable to recover your settings.
</message>
<!-- Plugin Placeholders -->

View File

@ -1,19 +0,0 @@
--- src/3rdparty/chromium/chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/chrome/browser/resources/safe_browsing/gen_file_type_proto.py
@@ -31,6 +31,7 @@ def PlatformTypes():
"android": download_file_types_pb2.DownloadFileType.PLATFORM_ANDROID,
"chromeos": download_file_types_pb2.DownloadFileType.PLATFORM_CHROME_OS,
"linux": download_file_types_pb2.DownloadFileType.PLATFORM_LINUX,
+ "bsd": download_file_types_pb2.DownloadFileType.PLATFORM_LINUX,
"mac": download_file_types_pb2.DownloadFileType.PLATFORM_MAC,
"win": download_file_types_pb2.DownloadFileType.PLATFORM_WINDOWS,
}
@@ -169,7 +170,7 @@ class DownloadFileTypeProtoGenerator(BinaryProtoGenera
'Outfile must have a %d for version and %s for platform.')
parser.add_option('-t', '--type',
help='The platform type. One of android, chromeos, ' +
- 'linux, mac, win')
+ 'linux, bsd, mac, win')
def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command):
if opts.type is not None:

View File

@ -11,10 +11,10 @@
const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
- FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
+ FILE_PATH_LITERAL("/usr/local/share/google-chrome/extensions");
+ FILE_PATH_LITERAL("%%LOCALBASE%%/share/google-chrome/extensions");
#else
- FILE_PATH_LITERAL("/usr/share/chromium/extensions");
+ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions");
+ FILE_PATH_LITERAL("%%LOCALBASE%%/share/chromium/extensions");
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
// The path to the hint file that tells the pepper plugin loader
@ -41,7 +41,7 @@
cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies"));
+#elif defined(OS_BSD)
+ cur = base::FilePath(FILE_PATH_LITERAL(
+ "/usr/local/etc/chrome/policies"));
+ "%%LOCALBASE%%/etc/chrome/policies"));
#else
cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies"));
#endif
@ -78,7 +78,7 @@
"/etc/opt/chrome/native-messaging-hosts"));
+#elif defined(OS_BSD)
+ cur = base::FilePath(FILE_PATH_LITERAL(
+ "/usr/local/etc/chrome/native-messaging-hosts"));
+ "%%LOCALBASE%%/etc/chrome/native-messaging-hosts"));
#else
cur = base::FilePath(FILE_PATH_LITERAL(
"/etc/chromium/native-messaging-hosts"));

View File

@ -1,11 +1,8 @@
--- src/3rdparty/chromium/chrome/common/features.gni.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/chrome/common/features.gni.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/chrome/common/features.gni
@@ -41,9 +41,9 @@ declare_args() {
(is_desktop_linux && use_dbus) || is_chromeos
enable_one_click_signin =
- is_win || is_mac || (is_linux && !is_chromeos && !is_chromecast)
+ is_win || is_mac || is_bsd || (is_linux && !is_chromeos && !is_chromecast)
@@ -55,7 +55,7 @@ declare_args() {
# Enables password change in leaked password dialog, disabled by default.
enable_password_change_in_leaked_dialog = false
- enable_service_discovery = (enable_mdns && !is_android) || is_mac
+ enable_service_discovery = (enable_mdns && !is_android) || is_mac || is_bsd

View File

@ -1,52 +0,0 @@
--- src/3rdparty/chromium/components/crash/content/app/BUILD.gn.orig 2020-03-16 14:04:24 UTC
+++ src/3rdparty/chromium/components/crash/content/app/BUILD.gn
@@ -51,17 +51,20 @@ static_library("app") {
"crashpad_win.cc",
]
- if (is_mac || is_win || is_android || is_linux) {
+ if ((is_mac || is_win || is_android || is_linux) && !is_bsd) {
sources += [ "crashpad.cc" ]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
sources += [
"breakpad_linux.cc",
"breakpad_linux.h",
"breakpad_linux_impl.h",
]
}
+ if (is_bsd) {
+ sources -= [ "crashpad_linux.cc" ]
+ }
defines = [ "CRASH_IMPLEMENTATION" ]
@@ -73,7 +76,7 @@ static_library("app") {
"//build:branding_buildflags",
]
- if (is_mac || is_win || is_android || is_linux) {
+ if ((is_mac || is_win || is_android || is_linux) && !is_bsd) {
deps += [
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/util",
@@ -99,7 +102,7 @@ static_library("app") {
]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
deps += [ "//third_party/breakpad:client" ]
}
@@ -130,7 +133,7 @@ static_library("app") {
libs = [ "log" ]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
data_deps = [
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]

View File

@ -1,43 +0,0 @@
--- src/3rdparty/chromium/components/crash/content/app/crashpad.cc.orig 2019-05-23 12:39:34 UTC
+++ src/3rdparty/chromium/components/crash/content/app/crashpad.cc
@@ -102,6 +102,12 @@ void InitializeCrashpadImpl(bool initial_client,
const base::FilePath& exe_path,
const std::vector<std::string>& initial_arguments,
bool embedded_handler) {
+
+#if defined(OS_BSD)
+ NOTIMPLEMENTED();
+ return;
+#endif
+
static bool initialized = false;
DCHECK(!initialized);
initialized = true;
@@ -122,7 +128,7 @@ void InitializeCrashpadImpl(bool initial_client,
DCHECK(browser_process || process_type == "Chrome Installer" ||
process_type == "notification-helper" ||
process_type == "GCPW Installer" || process_type == "GCPW DLL");
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
DCHECK(browser_process);
#else
#error Port.
@@ -187,7 +193,7 @@ void InitializeCrashpadImpl(bool initial_client,
// other "main, first process" to initialize things. There is no "relauncher"
// on Windows, so this is synonymous with initial_client.
const bool should_initialize_database_and_set_upload_policy = initial_client;
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
const bool should_initialize_database_and_set_upload_policy = browser_process;
#endif
if (should_initialize_database_and_set_upload_policy) {
@@ -267,7 +273,9 @@ bool GetUploadsEnabled() {
#if !defined(OS_ANDROID)
void DumpWithoutCrashing() {
+#if !defined(OS_BSD)
CRASHPAD_SIMULATE_CRASH();
+#endif
}
#endif

View File

@ -1,4 +1,4 @@
--- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2019-03-01 17:04:22 UTC
--- src/3rdparty/chromium/components/os_crypt/os_crypt.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/components/os_crypt/os_crypt.h
@@ -15,9 +15,9 @@
#include "base/strings/string16.h"
@ -10,7 +10,7 @@
-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
#if defined(OS_MACOSX) && !defined(OS_IOS)
#if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS))
class PrefRegistrySimple;
@@ -34,13 +34,13 @@ struct Config;
// true for Linux, if a password management tool is available.
@ -29,7 +29,7 @@
// On Linux returns true iff the real secret key (not hardcoded one) is
// available. On MacOS returns true if Keychain is available (for mock
// Keychain it returns true if not using locked Keychain, false if using
@@ -112,7 +112,7 @@ class OSCrypt {
@@ -131,7 +131,7 @@ class OSCrypt {
DISALLOW_IMPLICIT_CONSTRUCTORS(OSCrypt);
};
@ -38,7 +38,7 @@
// For unit testing purposes, inject methods to be used.
// |get_key_storage_mock| provides the desired |KeyStorage| implementation.
// If the provider returns |nullptr|, a hardcoded password will be used.
@@ -127,6 +127,6 @@ void UseMockKeyStorageForTesting(
@@ -146,6 +146,6 @@ void UseMockKeyStorageForTesting(
// Clears any caching and most lazy initialisations performed by the production
// code. Should be used after any test which required a password.
COMPONENT_EXPORT(OS_CRYPT) void ClearCacheForTesting();

View File

@ -1,39 +0,0 @@
--- src/3rdparty/chromium/components/safe_browsing/db/v4_rice.cc.orig 2019-05-23 12:39:34 UTC
+++ src/3rdparty/chromium/components/safe_browsing/db/v4_rice.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/numerics/safe_math.h"
#include "base/strings/stringprintf.h"
+#include "base/sys_byteorder.h"
#include "build/build_config.h"
#include "components/safe_browsing/db/v4_rice.h"
@@ -21,10 +22,6 @@ using ::google::protobuf::RepeatedField;
using ::google::protobuf::int32;
using ::google::protobuf::int64;
-#if !defined(ARCH_CPU_LITTLE_ENDIAN) || (ARCH_CPU_LITTLE_ENDIAN != 1)
-#error The code below assumes little-endianness.
-#endif
-
namespace safe_browsing {
namespace {
@@ -117,7 +114,7 @@ V4DecodeResult V4RiceDecoder::DecodePrefixes(const int
out->reserve((num_entries + 1));
base::CheckedNumeric<uint32_t> last_value(first_value);
- out->push_back(htonl(last_value.ValueOrDie()));
+ out->push_back(base::ByteSwap(static_cast<uint32_t>(last_value.ValueOrDie())));
if (num_entries > 0) {
V4RiceDecoder decoder(rice_parameter, num_entries, encoded_data);
@@ -136,7 +133,7 @@ V4DecodeResult V4RiceDecoder::DecodePrefixes(const int
// This flipping is done so that the decoded uint32 is interpreted
// correcly as a string of 4 bytes.
- out->push_back(htonl(last_value.ValueOrDie()));
+ out->push_back(base::ByteSwap(static_cast<uint32_t>(last_value.ValueOrDie())));
}
}

View File

@ -1,33 +0,0 @@
--- src/3rdparty/chromium/components/safe_browsing/db/v4_rice_unittest.cc.orig 2019-05-23 12:39:34 UTC
+++ src/3rdparty/chromium/components/safe_browsing/db/v4_rice_unittest.cc
@@ -6,6 +6,12 @@
#include "base/logging.h"
#include "testing/platform_test.h"
+#if defined(OS_WIN)
+#include <winsock2.h>
+#elif defined(OS_POSIX)
+#include <arpa/inet.h>
+#endif
+
using ::google::protobuf::RepeatedField;
using ::google::protobuf::int32;
@@ -247,7 +253,7 @@ TEST_F(V4RiceTest, TestDecoderPrefixesWithOneValue) {
EXPECT_EQ(DECODE_SUCCESS,
V4RiceDecoder::DecodePrefixes(0x69F67F51u, 2, 0, "", &out));
EXPECT_EQ(1u, out.size());
- EXPECT_EQ(0x69F67F51u, out[0]);
+ EXPECT_EQ(htonl(0x517FF669u), out[0]);
}
TEST_F(V4RiceTest, TestDecoderPrefixesWithMultipleValues) {
@@ -256,7 +262,7 @@ TEST_F(V4RiceTest, TestDecoderPrefixesWithMultipleValu
V4RiceDecoder::DecodePrefixes(
5, 28, 3, "\xbf\xa8\x3f\xfb\xf\xf\x5e\x27\xe6\xc3\x1d\xc6\x38",
&out));
- std::vector<uint32_t> expected = {5, 0xad934c0cu, 0x6ff67f56u, 0x81316fceu};
+ std::vector<uint32_t> expected = {htonl(0x05000000), htonl(0x0c4c93adu), htonl(0x567ff66fu), htonl(0xce6f3181u)};
EXPECT_EQ(expected.size(), out.size());
for (unsigned i = 0; i < expected.size(); i++) {
EXPECT_EQ(expected[i], out[i]);

View File

@ -0,0 +1,12 @@
--- src/3rdparty/chromium/content/browser/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/BUILD.gn
@@ -2003,6 +2003,9 @@ jumbo_static_library("browser") {
# resources on other platforms.
deps += [ "//content/browser/devtools:devtools_resources" ]
}
+ if (is_bsd) {
+ deps -= [ "//services/service_manager/zygote" ]
+ }
if (enable_basic_printing) {
deps += [ "//printing" ]

View File

@ -1,44 +1,34 @@
--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/content/browser/browser_main_loop.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/browser_main_loop.cc
@@ -255,6 +255,11 @@
@@ -247,6 +247,13 @@
#include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h"
#endif
+#if defined(OS_BSD)
+#include "content/browser/sandbox_host_linux.h"
+#include "services/service_manager/zygote/common/common_sandbox_support_linux.h"
+#include "content/public/common/common_sandbox_support_linux.h"
+#include "services/service_manager/sandbox/sandbox.h"
+#endif
+
// One of the linux specific headers defines this as a macro.
#ifdef DestroyAll
#undef DestroyAll
@@ -590,6 +595,11 @@ int BrowserMainLoop::EarlyInitialization() {
// by now since a thread to start the ServiceManager has been created
// before the browser main loop starts.
DCHECK(SandboxHostLinux::GetInstance()->IsInitialized());
+#elif defined(OS_BSD)
+ SandboxHostLinux::GetInstance()->Init();
+ base::FileHandleMappingVector fds_to_map;
+ const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket();
+ fds_to_map.push_back(std::make_pair(sfd, service_manager::GetSandboxFD()));
#endif
@@ -665,7 +672,7 @@ int BrowserMainLoop::EarlyInitialization() {
}
#endif // !defined(OS_MACOSX)
#if defined(USE_X11) && !defined(TOOLKIT_QT)
@@ -634,7 +644,7 @@ int BrowserMainLoop::EarlyInitialization() {
#endif // defined(OS_ANDROID) || defined(OS_CHROMEOS)
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
- defined(OS_ANDROID)
+ defined(OS_ANDROID) || defined(OS_BSD)
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \
defined(OS_ANDROID)
// We use quite a few file descriptors for our IPC as well as disk the disk
// cache,and the default limit on the Mac is low (256), so bump it up.
@@ -644,7 +654,7 @@ int BrowserMainLoop::EarlyInitialization() {
@@ -675,7 +682,7 @@ int BrowserMainLoop::EarlyInitialization() {
// users can easily hit this limit with many open tabs. Bump up the limit to
// an arbitrarily high number. See https://crbug.com/539567
base::IncreaseFdLimitTo(8192);
#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) ||
- // defined(OS_ANDROID)
+ // defined(OS_ANDROID) || defined(OS_BSD)
-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) ||
+#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) ||
// defined(OS_ANDROID)
#if defined(OS_WIN)
net::EnsureWinsockInit();

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/child_process_launcher_helper_linux.cc
@@ -17,7 +17,9 @@
@@ -18,7 +18,9 @@
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "services/service_manager/sandbox/linux/sandbox_linux.h"
#include "services/service_manager/zygote/common/common_sandbox_support_linux.h"
@ -10,7 +10,21 @@
#include "services/service_manager/zygote/host/zygote_communication_linux.h"
#include "services/service_manager/zygote/host/zygote_host_impl_linux.h"
@@ -69,6 +71,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr
@@ -50,11 +52,13 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLaunche
options->fds_to_remap = files_to_register.GetMappingWithIDAdjustment(
base::GlobalDescriptors::kBaseDescriptor);
+#if !defined(OS_BSD)
if (GetProcessType() == switches::kRendererProcess) {
const int sandbox_fd = SandboxHostLinux::GetInstance()->GetChildSocket();
options->fds_to_remap.push_back(
std::make_pair(sandbox_fd, service_manager::GetSandboxFD()));
}
+#endif
options->environment = delegate_->GetEnvironment();
@@ -69,6 +73,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr
int* launch_result) {
*is_synchronous_launch = true;
@ -18,17 +32,17 @@
service_manager::ZygoteHandle zygote_handle =
base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote)
? nullptr
@@ -82,7 +85,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr
@@ -82,7 +87,6 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr
GetProcessType());
*launch_result = LAUNCH_RESULT_SUCCESS;
-#if !defined(OS_OPENBSD)
if (handle) {
// This is just a starting score for a renderer or extension (the
// only types of processes that will be started this way). It will
@@ -93,13 +95,13 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr
// It could be a renderer process or an utility process.
int oom_score = content::kMiscOomScore;
@@ -92,13 +96,13 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThr
service_manager::ZygoteHostImpl::GetInstance()->AdjustRendererOOMScore(
handle, kLowestRendererOomScore);
handle, oom_score);
}
-#endif
@ -41,7 +55,7 @@
Process process;
process.process = base::LaunchProcess(*command_line(), options);
@@ -117,10 +119,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper
@@ -116,10 +120,14 @@ ChildProcessTerminationInfo ChildProcessLauncherHelper
const ChildProcessLauncherHelper::Process& process,
bool known_dead) {
ChildProcessTerminationInfo info;
@ -56,7 +70,7 @@
info.status = base::GetKnownDeadTerminationStatus(process.process.Handle(),
&info.exit_code);
} else {
@@ -144,13 +150,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer
@@ -143,13 +151,17 @@ void ChildProcessLauncherHelper::ForceNormalProcessTer
DCHECK(CurrentlyOnProcessLauncherTaskRunner());
process.process.Terminate(service_manager::RESULT_CODE_NORMAL_EXIT, false);
// On POSIX, we must additionally reap the child.

View File

@ -1,11 +0,0 @@
--- src/3rdparty/chromium/content/browser/compositor/gpu_process_transport_factory.cc.orig 2020-03-16 14:04:24 UTC
+++ src/3rdparty/chromium/content/browser/compositor/gpu_process_transport_factory.cc
@@ -114,7 +114,7 @@ viz::FrameSinkManagerImpl* GetFrameSinkManager() {
return content::BrowserMainLoop::GetInstance()->GetFrameSinkManager();
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
class HostDisplayClient : public viz::HostDisplayClient {
public:
explicit HostDisplayClient(ui::Compositor* compositor)

View File

@ -1,20 +0,0 @@
--- src/3rdparty/chromium/content/browser/compositor/software_browser_compositor_output_surface.cc.orig 2020-03-16 14:04:24 UTC
+++ src/3rdparty/chromium/content/browser/compositor/software_browser_compositor_output_surface.cc
@@ -89,7 +89,7 @@ void SoftwareBrowserCompositorOutputSurface::SwapBuffe
const gfx::Size& pixel_size) {
latency_tracker_.OnGpuSwapBuffersCompleted(latency_info);
client_->DidReceiveSwapBuffersAck({swap_time, swap_time});
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
if (needs_swap_size_notifications_)
client_->DidSwapWithSize(pixel_size);
#endif
@@ -129,7 +129,7 @@ unsigned SoftwareBrowserCompositorOutputSurface::Updat
return 0;
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
void SoftwareBrowserCompositorOutputSurface::SetNeedsSwapSizeNotifications(
bool needs_swap_size_notifications) {
needs_swap_size_notifications_ = needs_swap_size_notifications;

View File

@ -1,20 +0,0 @@
--- src/3rdparty/chromium/content/browser/compositor/software_browser_compositor_output_surface.h.orig 2020-03-16 14:04:24 UTC
+++ src/3rdparty/chromium/content/browser/compositor/software_browser_compositor_output_surface.h
@@ -39,7 +39,7 @@ class CONTENT_EXPORT SoftwareBrowserCompositorOutputSu
gfx::BufferFormat GetOverlayBufferFormat() const override;
uint32_t GetFramebufferCopyTextureFormat() override;
unsigned UpdateGpuFence() override;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
void SetNeedsSwapSizeNotifications(
bool needs_swap_size_notifications) override;
#endif
@@ -55,7 +55,7 @@ class CONTENT_EXPORT SoftwareBrowserCompositorOutputSu
base::TimeDelta refresh_interval_;
ui::LatencyTracker latency_tracker_;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
bool needs_swap_size_notifications_ = false;
#endif

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/compositor/viz_process_transport_factory.cc
@@ -109,7 +109,7 @@ class HostDisplayClient : public viz::HostDisplayClien
HostDisplayClient& operator=(const HostDisplayClient&) = delete;
// viz::HostDisplayClient:
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
void DidCompleteSwapWithNewSize(const gfx::Size& size) override {
compositor_->OnCompleteSwapWithNewSize(size);
}

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/content/browser/media/media_internals.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/content/browser/media/media_internals.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/media/media_internals.cc
@@ -506,7 +506,7 @@ void MediaInternals::UpdateVideoCaptureDeviceCapabilit
@@ -560,7 +560,7 @@ void MediaInternals::UpdateVideoCaptureDeviceCapabilit
device_dict->SetString("id", descriptor.device_id);
device_dict->SetString("name", descriptor.GetNameAndModel());
device_dict->Set("formats", std::move(format_list));
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
- defined(OS_ANDROID)
+ defined(OS_ANDROID) || defined(OS_BSD)
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
defined(OS_ANDROID)
device_dict->SetString("captureApi", descriptor.GetCaptureApiTypeString());
#endif
video_capture_capabilities_cached_data_.Append(std::move(device_dict));

View File

@ -1,9 +1,9 @@
--- src/3rdparty/chromium/content/browser/utility_process_host.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/content/browser/utility_process_host.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/utility_process_host.cc
@@ -209,7 +209,7 @@ UtilityProcessHost::UtilityProcessHost()
@@ -247,7 +247,7 @@ UtilityProcessHost::UtilityProcessHost()
UtilityProcessHost::UtilityProcessHost(std::unique_ptr<Client> client)
: sandbox_type_(service_manager::SANDBOX_TYPE_UTILITY),
: sandbox_type_(service_manager::SandboxType::kUtility),
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
child_flags_(ChildProcessHost::CHILD_ALLOW_SELF),

View File

@ -0,0 +1,20 @@
--- src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/utility_process_host_receiver_bindings.cc
@@ -8,7 +8,7 @@
#include "build/build_config.h"
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
#include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck
#include "content/browser/font_service.h" // nogncheck
#endif
@@ -17,7 +17,7 @@ namespace content {
void UtilityProcessHost::BindHostReceiver(
mojo::GenericPendingReceiver receiver) {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
if (auto font_receiver = receiver.As<font_service::mojom::FontService>()) {
ConnectToFontService(std::move(font_receiver));
return;

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/content/browser/v8_snapshot_files.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/v8_snapshot_files.cc
@@ -10,7 +10,7 @@
namespace content {
std::map<std::string, base::FilePath> GetV8SnapshotFilesToPreload() {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
#if defined(USE_V8_CONTEXT_SNAPSHOT)
return {{kV8ContextSnapshotDataDescriptor,
base::FilePath(FILE_PATH_LITERAL("v8_context_snapshot.bin"))}};

View File

@ -1,9 +1,9 @@
--- src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/browser/webui/shared_resources_data_source.cc
@@ -120,12 +120,12 @@ const std::map<int, std::string> CreateMojoResourceIdT
"mojo/mojo/public/mojom/base/string16.mojom.html"},
{IDR_MOJO_STRING16_MOJOM_LITE_JS,
"mojo/mojo/public/mojom/base/string16.mojom-lite.js"},
@@ -131,12 +131,12 @@ const std::map<int, std::string> CreateMojoResourceIdT
"mojo/mojo/public/mojom/base/text_direction.mojom.html"},
{IDR_MOJO_TEXT_DIRECTION_MOJOM_LITE_JS,
"mojo/mojo/public/mojom/base/text_direction.mojom-lite.js"},
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
{IDR_MOJO_TIME_MOJOM_HTML,

View File

@ -0,0 +1,16 @@
--- src/3rdparty/chromium/content/child/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/child/BUILD.gn
@@ -147,8 +147,12 @@ target(link_target_type, "child") {
deps += [
"//components/services/font/public/cpp",
"//components/services/font/public/mojom",
- "//services/service_manager/zygote",
]
+ if (!is_bsd) {
+ deps += [
+ "//services/service_manager/zygote",
+ ]
+ }
}
if (is_win) {

View File

@ -1,5 +1,14 @@
--- src/3rdparty/chromium/content/gpu/BUILD.gn.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/content/gpu/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/gpu/BUILD.gn
@@ -96,7 +96,7 @@ target(link_target_type, "gpu_sources") {
]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
deps += [ "//services/service_manager/zygote" ]
}
@@ -130,7 +130,7 @@ target(link_target_type, "gpu_sources") {
# Use DRI on desktop Linux builds.

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/content/public/app/content_main_delegate.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/content/public/app/content_main_delegate.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/public/app/content_main_delegate.cc
@@ -38,13 +38,13 @@ bool ContentMainDelegate::DelaySandboxInitialization(
return false;
@@ -27,13 +27,13 @@ int ContentMainDelegate::RunProcess(
return -1;
}
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
void ContentMainDelegate::ZygoteStarting(
std::vector<std::unique_ptr<service_manager::ZygoteForkDelegate>>*

View File

@ -1,20 +1,20 @@
--- src/3rdparty/chromium/content/public/app/content_main_delegate.h.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/content/public/app/content_main_delegate.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/public/app/content_main_delegate.h
@@ -71,7 +71,7 @@ class CONTENT_EXPORT ContentMainDelegate {
// want it at all.
virtual bool DelaySandboxInitialization(const std::string& process_type);
@@ -60,7 +60,7 @@ class CONTENT_EXPORT ContentMainDelegate {
// Called right before the process exits.
virtual void ProcessExiting(const std::string& process_type) {}
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Tells the embedder that the zygote process is starting, and allows it to
// specify one or more zygote delegates if it wishes by storing them in
// |*delegates|.
@@ -81,7 +81,7 @@ class CONTENT_EXPORT ContentMainDelegate {
@@ -70,7 +70,7 @@ class CONTENT_EXPORT ContentMainDelegate {
// Called every time the zygote process forks.
virtual void ZygoteForked() {}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
// Allows the embedder to prevent locking the scheme registry. The scheme
// registry is the list of URL schemes we recognize, with some additional
// Fatal errors during initialization are reported by this function, so that
// the embedder can implement graceful exit by displaying some message and

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/content/public/common/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/public/common/BUILD.gn
@@ -254,7 +254,7 @@ jumbo_source_set("common_sources") {
deps += [ "//content/public/android:jni" ]
}
- if (is_linux) {
+ if (is_linux && !is_bsd) {
deps += [ "//services/service_manager/zygote" ]
}

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/content/public/common/content_constants.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/public/common/content_constants.cc
@@ -46,7 +46,7 @@ const int kDefaultDetachableCancelDelayMs = 30000;
const char kCorsExemptPurposeHeaderName[] = "Purpose";
const char kCorsExemptRequestedWithHeaderName[] = "X-Requested-With";
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
const int kLowestRendererOomScore = 300;
const int kHighestRendererOomScore = 1000;

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/content/public/common/content_constants.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/public/common/content_constants.h
@@ -65,7 +65,7 @@ CONTENT_EXPORT extern const int kDefaultDetachableCanc
CONTENT_EXPORT extern const char kCorsExemptPurposeHeaderName[];
CONTENT_EXPORT extern const char kCorsExemptRequestedWithHeaderName[];
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// The OOM score adj constants
// The highest and lowest assigned OOM score adjustment (oom_score_adj) for
// renderers and extensions used by the OomPriority Manager.

View File

@ -0,0 +1,18 @@
--- src/3rdparty/chromium/content/renderer/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/renderer/BUILD.gn
@@ -462,10 +462,11 @@ target(link_target_type, "renderer") {
}
if (is_linux) {
- deps += [
- "//components/services/font/public/cpp",
- "//services/service_manager/zygote",
- ]
+ deps += [ "//components/services/font/public/cpp" ]
+
+ if (!is_bsd) {
+ deps += [ "//services/service_manager/zygote" ]
+ }
}
if (is_mac) {

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/content/renderer/media/audio/audio_device_factory.cc.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/content/renderer/media/audio/audio_device_factory.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/renderer/media/audio/audio_device_factory.cc
@@ -33,7 +33,7 @@ AudioDeviceFactory* AudioDeviceFactory::factory_ = nul
@@ -36,7 +36,7 @@ AudioDeviceFactory* AudioDeviceFactory::factory_ = nul
namespace {
-#if defined(OS_WIN) || defined(OS_MACOSX) || \
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
#if defined(OS_WIN) || defined(OS_MACOSX) || \
- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
// Due to driver deadlock issues on Windows (http://crbug/422522) there is a
// chance device authorization response is never received from the browser side.
// In this case we will time out, to avoid renderer hang forever waiting for

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/content/renderer/render_thread_impl.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/renderer/render_thread_impl.cc
@@ -188,12 +188,21 @@
@@ -176,12 +176,21 @@
#include "mojo/public/cpp/bindings/message_dumper.h"
#endif
@ -22,7 +22,7 @@
using base::ThreadRestrictions;
using blink::WebDocument;
using blink::WebFrame;
@@ -927,7 +936,7 @@ void RenderThreadImpl::Init() {
@@ -739,7 +748,7 @@ void RenderThreadImpl::Init() {
DCHECK(parsed_num_raster_threads) << string_value;
DCHECK_GT(num_raster_threads, 0);
@ -31,16 +31,16 @@
categorized_worker_pool_->SetBackgroundingCallback(
main_thread_scheduler_->DefaultTaskRunner(),
base::BindOnce(
@@ -957,7 +966,7 @@ void RenderThreadImpl::Init() {
@@ -762,7 +771,7 @@ void RenderThreadImpl::Init() {
base::DiscardableMemoryAllocator::SetInstance(
discardable_shared_memory_manager_.get());
discardable_memory_allocator_.get());
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
if (base::FeatureList::IsEnabled(
blink::features::kBlinkCompositorUseDisplayThreadPriority)) {
render_message_filter()->SetThreadPriority(
@@ -1333,7 +1342,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl:
@@ -1148,7 +1157,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl:
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
#else
cmd_line->HasSwitch(switches::kEnableGpuMemoryBufferVideoFrames);

View File

@ -1,6 +1,29 @@
--- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/content/shell/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/shell/BUILD.gn
@@ -980,7 +980,7 @@ group("content_shell_crash_test") {
@@ -90,7 +90,7 @@ static_library("content_shell_app") {
"//content/public/app:both",
"//v8",
]
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
deps += [
"//components/crash/core/app",
"//components/crash/core/app:test_support",
@@ -366,6 +366,13 @@ static_library("content_shell_lib") {
]
deps += [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.ui.policy" ]
}
+ if (is_bsd) {
+ deps -= [
+ "//components/crash/content/browser",
+ "//components/crash/core/app",
+ "//components/crash/core/app:test_support",
+ ]
+ }
# Annoyingly, this target and web_test_support have circular includes.
allow_circular_includes_from = [ "//content/test:web_test_support" ]
@@ -959,7 +966,7 @@ group("content_shell_crash_test") {
if (is_win) {
data_deps += [ "//build/win:copy_cdb_to_output" ]
}

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/content/utility/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/content/utility/BUILD.gn
@@ -82,7 +82,7 @@ jumbo_source_set("utility") {
deps += [ "//services/proxy_resolver:lib" ]
}
- if (is_linux && !use_qt) {
+ if (is_linux && !use_qt && !is_bsd) {
deps += [ "//content/utility/soda:soda_sandbox_hook" ]
}

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/device/bluetooth/BUILD.gn.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/device/bluetooth/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/device/bluetooth/BUILD.gn
@@ -266,7 +266,7 @@ component("bluetooth") {
@@ -275,7 +275,7 @@ component("bluetooth") {
]
}
- if (is_chromeos || is_linux) {
+ if (is_chromeos || (is_linux && !is_bsd)) {
+ if (is_chromeos || is_linux && !is_bsd) {
if (use_dbus && is_chromeos) {
# This crap uses ChromeOS specific system API
sources += [

View File

@ -1,11 +1,20 @@
--- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2019-05-23 12:39:34 UTC
--- src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/command_buffer/common/gpu_memory_buffer_support.cc
@@ -89,7 +89,7 @@ bool IsImageSizeValidForGpuMemoryBufferFormat(const gf
@@ -54,7 +54,7 @@ bool IsImageSizeValidForGpuMemoryBufferFormat(const gf
uint32_t GetPlatformSpecificTextureTarget() {
#if defined(OS_MACOSX)
return GL_TEXTURE_RECTANGLE_ARB;
return macos_specific_texture_target;
-#elif defined(OS_ANDROID) || defined(OS_LINUX)
+#elif defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
return GL_TEXTURE_EXTERNAL_OES;
#elif defined(OS_WIN)
#elif defined(OS_WIN) || defined(OS_FUCHSIA)
return GL_TEXTURE_2D;
@@ -84,7 +84,7 @@ GPU_EXPORT uint32_t GetBufferTextureTarget(gfx::Buffer
GPU_EXPORT bool NativeBufferNeedsPlatformSpecificTextureTarget(
gfx::BufferFormat format) {
-#if defined(USE_OZONE) || defined(OS_LINUX)
+#if defined(USE_OZONE) || defined(OS_LINUX) || defined(OS_BSD)
// Always use GL_TEXTURE_2D as the target for RGB textures.
// https://crbug.com/916728
if (format == gfx::BufferFormat::R_8 || format == gfx::BufferFormat::RG_88 ||

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.cc
@@ -26,7 +26,7 @@
@@ -29,7 +29,7 @@
#include "ui/gl/buildflags.h"
#include "ui/gl/gl_context.h"
@ -9,65 +9,74 @@
#include "gpu/command_buffer/service/external_vk_image_dawn_representation.h"
#endif
@@ -34,7 +34,7 @@
@@ -37,7 +37,7 @@
#include "gpu/vulkan/fuchsia/vulkan_fuchsia_ext.h"
#endif
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586
#endif
@@ -537,7 +537,7 @@ std::unique_ptr<SharedImageRepresentationDawn>
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD)
#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581
#define GL_TEXTURE_TILING_EXT 0x9580
#define GL_TILING_TYPES_EXT 0x9583
@@ -510,7 +510,7 @@ std::unique_ptr<SharedImageRepresentationDawn>
ExternalVkImageBacking::ProduceDawn(SharedImageManager* manager,
MemoryTypeTracker* tracker,
WGPUDevice wgpuDevice) {
-#if defined(OS_LINUX) && BUILDFLAG(USE_DAWN)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN)
if (!wgpu_format_) {
DLOG(ERROR) << "Format not supported for Dawn";
return nullptr;
@@ -560,14 +560,14 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager
auto wgpu_format = viz::ToWGPUFormat(format());
if (wgpu_format == WGPUTextureFormat_Undefined) {
@@ -529,14 +529,14 @@ ExternalVkImageBacking::ProduceDawn(SharedImageManager
return std::make_unique<ExternalVkImageDawnRepresentation>(
manager, this, tracker, wgpuDevice, wgpu_format_.value(), memory_fd,
image_info.fAlloc.fSize, memory_type_index_.value());
manager, this, tracker, wgpuDevice, wgpu_format, std::move(memory_fd));
-#else // !defined(OS_LINUX) || !BUILDFLAG(USE_DAWN)
+#else // !defined(OS_LINUX) || !defined(OS_BSD) || !BUILDFLAG(USE_DAWN)
+#else // (!defined(OS_LINUX) && !defined(OS_BSD)) || !BUILDFLAG(USE_DAWN)
NOTIMPLEMENTED_LOG_ONCE();
return nullptr;
#endif
}
GLuint ExternalVkImageBacking::ProduceGLTextureInternal() {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \
defined(OS_WIN)
GrVkImageInfo image_info;
bool result = backend_texture_.getVkImageInfo(&image_info);
DCHECK(result);
@@ -631,7 +631,7 @@ ExternalVkImageBacking::ProduceGLTexture(SharedImageMa
@@ -545,7 +545,7 @@ GLuint ExternalVkImageBacking::ProduceGLTextureInterna
gl::GLApi* api = gl::g_current_gl_context;
GLuint memory_object = 0;
if (!use_separate_gl_texture()) {
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
auto memory_fd = image_->GetMemoryFd();
if (!memory_fd.is_valid()) {
return 0;
@@ -608,7 +608,7 @@ GLuint ExternalVkImageBacking::ProduceGLTextureInterna
}
api->glBindTextureFn(GL_TEXTURE_2D, old_texture_binding);
return texture_service_id;
-#else // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
+#else // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) && !defined(OS_BSD)
#error Unsupported OS
#endif
}
@@ -622,7 +622,7 @@ ExternalVkImageBacking::ProduceGLTexture(SharedImageMa
return nullptr;
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \
defined(OS_WIN)
if (!texture_) {
GLuint texture_service_id = ProduceGLTextureInternal();
if (!texture_service_id)
@@ -677,7 +677,7 @@ ExternalVkImageBacking::ProduceGLTexturePassthrough(
@@ -666,7 +666,7 @@ ExternalVkImageBacking::ProduceGLTexturePassthrough(
return nullptr;
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \
defined(OS_WIN)
if (!texture_passthrough_) {
GLuint texture_service_id = ProduceGLTextureInternal();
if (!texture_service_id)
@@ -715,7 +715,7 @@ ExternalVkImageBacking::ProduceSkia(
tracker);
}
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_BSD)
int ExternalVkImageBacking::GetMemoryFd(const GrVkImageInfo& image_info) {
VkMemoryGetFdInfoKHR get_fd_info;
get_fd_info.sType = VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR;

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.h.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_backing.h
@@ -131,7 +131,7 @@ class ExternalVkImageBacking final : public SharedImag
base::Optional<DawnTextureFormat> dawn_format,
base::Optional<uint32_t> memory_type_index);
@@ -151,7 +151,7 @@ class ExternalVkImageBacking final : public ClearTrack
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_BSD)
private:
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
// Extract file descriptor from image
int GetMemoryFd(const GrVkImageInfo& image_info);
#endif

View File

@ -1,20 +1,11 @@
--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_gl_representation.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_gl_representation.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/command_buffer/service/external_vk_image_gl_representation.cc
@@ -183,7 +183,7 @@ GLuint ExternalVkImageGlRepresentation::ImportVkSemaph
#if defined(OS_FUCHSIA)
NOTIMPLEMENTED_LOG_ONCE();
return 0;
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
@@ -188,7 +188,7 @@ GLuint ExternalVkImageGLRepresentationShared::ImportVk
SemaphoreHandle handle) {
if (!handle.is_valid())
return 0;
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
if (handle.vk_handle_type() !=
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT) {
DLOG(ERROR) << "Importing semaphore handle of unexpected type:"
@@ -198,7 +198,7 @@ GLuint ExternalVkImageGlRepresentation::ImportVkSemaph
fd.release());
return gl_semaphore;
-#else // !defined(OS_FUCHSIA) && !defined(OS_LINUX)
+#else // !defined(OS_FUCHSIA) && !defined(OS_LINUX) && !defined(OS_BSD)
#error Unsupported OS
#endif
}

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/ipc/common/gpu_memory_buffer_support.cc
@@ -12,7 +12,7 @@
@@ -14,7 +14,7 @@
#include "gpu/ipc/common/gpu_memory_buffer_impl_io_surface.h"
#endif
@ -9,7 +9,7 @@
#include "ui/gfx/client_native_pixmap_factory.h"
#include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h"
#endif
@@ -22,7 +22,7 @@
@@ -24,7 +24,7 @@
#include "ui/ozone/public/ozone_platform.h"
#endif
@ -18,16 +18,7 @@
#include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
#endif
@@ -112,7 +112,7 @@ bool GpuMemoryBufferSupport::IsNativeGpuMemoryBufferCo
#elif defined(USE_OZONE)
return ui::OzonePlatform::GetInstance()->IsNativePixmapConfigSupported(format,
usage);
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_BSD)
return false; // TODO(julian.isorce): Add linux support.
#elif defined(OS_WIN)
switch (usage) {
@@ -168,7 +168,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH
@@ -181,7 +181,7 @@ GpuMemoryBufferSupport::CreateGpuMemoryBufferImplFromH
return GpuMemoryBufferImplIOSurface::CreateFromHandle(
std::move(handle), size, format, usage, std::move(callback));
#endif

View File

@ -1,34 +1,43 @@
--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/ipc/service/gpu_init.cc
@@ -109,7 +109,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in
@@ -92,7 +92,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in
#endif
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)) || defined(OS_BSD)
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)) || defined(OS_BSD)
bool CanAccessNvidiaDeviceFile() {
bool res = true;
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
@@ -120,7 +120,7 @@ bool CanAccessNvidiaDeviceFile() {
@@ -103,7 +103,7 @@ bool CanAccessNvidiaDeviceFile() {
}
return res;
}
-#endif // OS_LINUX && !OS_CHROMEOS && !IS_CHROMECAST
+#endif // (OS_LINUX && !OS_CHROMEOS && !IS_CHROMECAST) || OS_BSD
-#endif // OS_LINUX && !OS_CHROMEOS && !BUILDFLAG(IS_CHROMECAST)
+#endif // (OS_LINUX && !OS_CHROMEOS && !BUILDFLAG(IS_CHROMECAST)) || defined(OS_BSD)
class GpuWatchdogInit {
public:
@@ -165,7 +165,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
// crash during feature collection.
gpu::SetKeysForCrashLogging(gpu_info_);
@@ -161,7 +161,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
gpu_info_.subpixel_font_rendering = true;
#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA
gpu_info_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile())
return false;
@@ -246,7 +246,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
sandbox_helper_->PreSandboxStartup();
@@ -213,7 +213,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
delayed_watchdog_enable = true;
#endif
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// PreSandbox is mainly for resource handling and not related to the GPU
// driver, it doesn't need the GPU watchdog. The loadLibrary may take long
// time that killing and restarting the GPU process will not help.
@@ -258,7 +258,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
}
bool attempted_startsandbox = false;
-#if defined(OS_LINUX)
@ -36,7 +45,7 @@
// On Chrome OS ARM Mali, GPU driver userspace creates threads when
// initializing a GL context, so start the sandbox early.
// TODO(zmo): Need to collect OS version before this.
@@ -255,7 +255,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
@@ -267,7 +267,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
watchdog_thread_.get(), &gpu_info_, gpu_preferences_);
attempted_startsandbox = true;
}
@ -45,7 +54,7 @@
base::TimeTicks before_initialize_one_off = base::TimeTicks::Now();
@@ -280,14 +280,14 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
@@ -291,14 +291,14 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
}
if (gl_initialized && use_swiftshader &&
gl::GetGLImplementation() != gl::kGLImplementationSwiftShaderGL) {
@ -60,9 +69,18 @@
-#endif // OS_LINUX
+#endif // OS_LINUX || OS_BSD
}
if (!gl_initialized)
gl_initialized = gl::init::InitializeGLNoExtensionsOneOff();
@@ -314,7 +314,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
if (!gl_initialized) {
@@ -324,7 +324,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
}
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) && !defined(OS_BSD)
// The ContentSandboxHelper is currently the only one implementation of
// gpu::GpuSandboxHelper and it has no dependency. Except on Linux where
// VaapiWrapper checks the GL implementation to determine which display
@@ -375,7 +375,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
command_line, gpu_feature_info_,
gpu_preferences_.disable_software_rasterizer, false);
if (use_swiftshader) {
@ -71,7 +89,7 @@
VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly "
<< "on Linux";
return false;
@@ -326,7 +326,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
@@ -389,7 +389,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
<< "failed";
return false;
}
@ -80,7 +98,7 @@
}
} else { // use_swiftshader == true
switch (gpu_preferences_.use_vulkan) {
@@ -413,7 +413,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
@@ -445,7 +445,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
InitializePlatformOverlaySettings(&gpu_info_);
@ -89,7 +107,7 @@
// Driver may create a compatibility profile context when collect graphics
// information on Linux platform. Try to collect graphics information
// based on core profile context after disabling platform extensions.
@@ -432,7 +432,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
@@ -464,7 +464,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
return false;
}
}
@ -98,7 +116,7 @@
if (use_swiftshader) {
AdjustInfoToSwiftShader();
@@ -604,7 +604,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c
@@ -631,7 +631,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c
InitializePlatformOverlaySettings(&gpu_info_);
@ -107,7 +125,7 @@
// Driver may create a compatibility profile context when collect graphics
// information on Linux platform. Try to collect graphics information
// based on core profile context after disabling platform extensions.
@@ -624,7 +624,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c
@@ -651,7 +651,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c
}
}
}

View File

@ -1,15 +1,15 @@
--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.cc
@@ -40,7 +40,7 @@ const int kGpuTimeout = 15000;
const int kGpuTimeout = 10000;
#endif
@@ -64,7 +64,7 @@ void GpuWatchdogTimeoutHistogram(GpuWatchdogTimeoutEve
base::UmaHistogramEnumeration("GPU.WatchdogThread.V1.Timeout", timeout_event);
}
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(OS_BSD)
const base::FilePath::CharType kTtyFilePath[] =
FILE_PATH_LITERAL("/sys/class/tty/tty0/active");
#endif
@@ -59,7 +59,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1()
@@ -82,7 +82,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1()
arm_cpu_time_(),
#endif
suspension_counter_(this)
@ -18,16 +18,16 @@
,
host_tty_(-1)
#endif
@@ -76,7 +76,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1()
@@ -104,7 +104,7 @@ GpuWatchdogThreadImplV1::GpuWatchdogThreadImplV1()
DCHECK(result);
#endif
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(OS_BSD)
tty_file_ = base::OpenFile(base::FilePath(kTtyFilePath), "r");
host_tty_ = GetActiveTTY();
#endif
@@ -222,7 +222,7 @@ GpuWatchdogThreadImplV1::~GpuWatchdogThreadImplV1() {
UpdateActiveTTY();
host_tty_ = active_tty_;
@@ -252,7 +252,7 @@ GpuWatchdogThreadImplV1::~GpuWatchdogThreadImplV1() {
base::PowerMonitor::RemoveObserver(this);
@ -36,21 +36,21 @@
if (tty_file_)
fclose(tty_file_);
#endif
@@ -371,7 +371,7 @@ void GpuWatchdogThreadImplV1::DeliberatelyTerminateToR
@@ -435,7 +435,7 @@ void GpuWatchdogThreadImplV1::DeliberatelyTerminateToR
return;
#endif
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(OS_BSD)
// Don't crash if we're not on the TTY of our host X11 server.
int active_tty = GetActiveTTY();
if (host_tty_ != -1 && active_tty != -1 && host_tty_ != active_tty) {
@@ -528,7 +528,7 @@ base::ThreadTicks GpuWatchdogThreadImplV1::GetWatchedT
UpdateActiveTTY();
if (host_tty_ != -1 && active_tty_ != -1 && host_tty_ != active_tty_) {
@@ -610,7 +610,7 @@ base::ThreadTicks GpuWatchdogThreadImplV1::GetWatchedT
}
#endif
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(OS_BSD)
int GpuWatchdogThreadImplV1::GetActiveTTY() const {
char tty_string[8] = {0};
if (tty_file_ && !fseek(tty_file_, 0, SEEK_SET) &&
void GpuWatchdogThreadImplV1::UpdateActiveTTY() {
last_active_tty_ = active_tty_;

View File

@ -1,20 +1,20 @@
--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/ipc/service/gpu_watchdog_thread.h
@@ -171,7 +171,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1
@@ -213,7 +213,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1
base::ThreadTicks GetWatchedThreadTime();
#endif
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(OS_BSD)
int GetActiveTTY() const;
void UpdateActiveTTY();
#endif
@@ -219,7 +219,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1
base::Time check_time_;
base::TimeTicks check_timeticks_;
@@ -271,7 +271,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV1
// whether GpuWatchdogThreadEvent::kGpuWatchdogStart has been recorded.
bool is_watchdog_start_histogram_recorded = false;
-#if defined(USE_X11)
+#if defined(USE_X11) && !defined(OS_BSD)
FILE* tty_file_;
int host_tty_;
#endif
int active_tty_ = -1;

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.cc
@@ -716,7 +716,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer
@@ -828,7 +828,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer
}
#endif // defined(OS_ANDROID)
@ -9,24 +9,24 @@
if (gfx::HasExtension(enabled_extensions,
VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME)) {
vkGetSemaphoreFdKHRFn = reinterpret_cast<PFN_vkGetSemaphoreFdKHR>(
@@ -735,9 +735,9 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer
@@ -847,9 +847,9 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer
return false;
}
}
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
if (gfx::HasExtension(enabled_extensions,
VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME)) {
vkGetMemoryFdKHRFn = reinterpret_cast<PFN_vkGetMemoryFdKHR>(
@@ -748,7 +748,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer
@@ -869,7 +869,7 @@ bool VulkanFunctionPointers::BindDeviceFunctionPointer
return false;
}
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
#if defined(OS_FUCHSIA)
if (gfx::HasExtension(enabled_extensions,

View File

@ -1,26 +1,26 @@
--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig 2020-03-16 14:04:24 UTC
--- src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/gpu/vulkan/vulkan_function_pointers.h
@@ -178,15 +178,15 @@ struct VulkanFunctionPointers {
vkGetAndroidHardwareBufferPropertiesANDROIDFn = nullptr;
@@ -227,15 +227,15 @@ struct VulkanFunctionPointers {
vkGetAndroidHardwareBufferPropertiesANDROIDFn;
#endif // defined(OS_ANDROID)
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHRFn = nullptr;
PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHRFn = nullptr;
VulkanFunction<PFN_vkGetSemaphoreFdKHR> vkGetSemaphoreFdKHRFn;
VulkanFunction<PFN_vkImportSemaphoreFdKHR> vkImportSemaphoreFdKHRFn;
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
PFN_vkGetMemoryFdKHR vkGetMemoryFdKHRFn = nullptr;
PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHRFn = nullptr;
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
VulkanFunction<PFN_vkGetMemoryFdKHR> vkGetMemoryFdKHRFn;
VulkanFunction<PFN_vkGetMemoryFdPropertiesKHR> vkGetMemoryFdPropertiesKHRFn;
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
#if defined(OS_FUCHSIA)
PFN_vkImportSemaphoreZirconHandleFUCHSIA
@@ -374,18 +374,18 @@ struct VulkanFunctionPointers {
VulkanFunction<PFN_vkImportSemaphoreZirconHandleFUCHSIA>
@@ -447,18 +447,18 @@ struct VulkanFunctionPointers {
->vkGetAndroidHardwareBufferPropertiesANDROIDFn
#endif // defined(OS_ANDROID)
@ -33,13 +33,20 @@
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
#define vkGetMemoryFdKHR gpu::GetVulkanFunctionPointers()->vkGetMemoryFdKHRFn
#define vkGetMemoryFdPropertiesKHR \
gpu::GetVulkanFunctionPointers()->vkGetMemoryFdPropertiesKHRFn
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
#if defined(OS_FUCHSIA)
#define vkImportSemaphoreZirconHandleFUCHSIA \
@@ -493,4 +493,4 @@ struct VulkanFunctionPointers {
gpu::GetVulkanFunctionPointers()->vkGetSwapchainImagesKHRFn
#define vkQueuePresentKHR gpu::GetVulkanFunctionPointers()->vkQueuePresentKHRFn
-#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_
\ No newline at end of file
+#endif // GPU_VULKAN_VULKAN_FUNCTION_POINTERS_H_

View File

@ -0,0 +1,56 @@
--- src/3rdparty/chromium/headless/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/headless/BUILD.gn
@@ -276,7 +276,7 @@ jumbo_source_set("headless_shared_sources") {
sources += generated_devtools_api
sources += get_target_outputs(":protocol_sources")
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
sources += [
"lib/headless_crash_reporter_client.cc",
"lib/headless_crash_reporter_client.h",
@@ -295,7 +295,7 @@ jumbo_source_set("headless_shared_sources") {
"//url",
]
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
deps += [ "//components/crash/content/browser" ]
}
if (is_component_build && is_win) {
@@ -451,7 +451,7 @@ jumbo_component("headless_non_renderer") {
"//v8",
]
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
deps += [ "//components/crash/content/browser" ]
}
if (is_win) {
@@ -598,7 +598,7 @@ test("headless_unittests") {
"//testing/gtest",
]
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
deps += [ "//components/crash/content/browser" ]
}
@@ -682,7 +682,7 @@ test("headless_browsertests") {
"//ui/base/clipboard",
]
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
deps += [ "//components/crash/content/browser" ]
}
@@ -810,7 +810,7 @@ jumbo_static_library("headless_shell_lib") {
public_deps += [ ":headless_non_renderer" ]
}
- if (!is_fuchsia) {
+ if (!is_fuchsia && !is_bsd) {
deps += [ "//components/crash/content/browser" ]
}

View File

@ -1,7 +1,7 @@
--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/headless/lib/browser/headless_content_browser_client.cc
@@ -205,7 +205,7 @@ void HeadlessContentBrowserClient::GetQuotaSettings(
partition->GetPath(), context->IsOffTheRecord(), std::move(callback));
@@ -157,7 +157,7 @@ HeadlessContentBrowserClient::GetGeneratedCodeCacheSet
return content::GeneratedCodeCacheSettings(true, 0, context->GetPath());
}
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
@ -9,7 +9,7 @@
void HeadlessContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
@@ -216,7 +216,7 @@ void HeadlessContentBrowserClient::GetAdditionalMapped
@@ -168,7 +168,7 @@ void HeadlessContentBrowserClient::GetAdditionalMapped
mappings->Share(service_manager::kCrashDumpSignal, crash_signal_fd);
#endif // defined(HEADLESS_USE_BREAKPAD)
}
@ -18,3 +18,12 @@
void HeadlessContentBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
@@ -231,7 +231,7 @@ void HeadlessContentBrowserClient::AppendExtraCommandL
process_type, child_process_id);
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Processes may only query perf_event_open with the BPF sandbox disabled.
if (old_command_line.HasSwitch(::switches::kEnableThreadInstructionCount) &&
old_command_line.HasSwitch(service_manager::switches::kNoSandbox)) {

View File

@ -1,6 +1,24 @@
--- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/headless/lib/headless_content_main_delegate.cc
@@ -324,7 +324,7 @@ int HeadlessContentMainDelegate::RunProcess(
@@ -322,7 +322,7 @@ void HeadlessContentMainDelegate::InitCrashReporter(
const base::CommandLine& command_line) {
if (command_line.HasSwitch(::switches::kDisableBreakpad))
return;
-#if defined(OS_FUCHSIA)
+#if defined(OS_FUCHSIA) || defined(OS_BSD)
// TODO(fuchsia): Implement this when crash reporting/Breakpad are available
// in Fuchsia. (crbug.com/753619)
NOTIMPLEMENTED();
@@ -351,7 +351,7 @@ void HeadlessContentMainDelegate::InitCrashReporter(
crash_reporter::InitializeCrashpadWithEmbeddedHandler(
process_type.empty(), process_type, "", base::FilePath());
#endif // defined(HEADLESS_USE_BREAKPAD)
-#endif // defined(OS_FUCHSIA)
+#endif // defined(OS_FUCHSIA) || defined(OS_BSD)
}
@@ -405,7 +405,7 @@ int HeadlessContentMainDelegate::RunProcess(
}
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
@ -9,7 +27,7 @@
void SIGTERMProfilingShutdown(int signal) {
content::Profiling::Stop();
struct sigaction sigact;
@@ -359,7 +359,7 @@ void HeadlessContentMainDelegate::ZygoteForked() {
@@ -440,7 +440,7 @@ void HeadlessContentMainDelegate::ZygoteForked() {
breakpad::InitCrashReporter(process_type);
#endif
}

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/ipc/ipc_channel_common.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/ipc/ipc_channel_common.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/ipc/ipc_channel_common.cc
@@ -9,7 +9,7 @@
@@ -10,7 +10,7 @@
namespace IPC {
@ -9,3 +9,12 @@
namespace {
int g_global_pid = 0;
@@ -26,7 +26,7 @@ int Channel::GetGlobalPid() {
return g_global_pid;
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
// static
std::unique_ptr<Channel> Channel::CreateClient(

View File

@ -1,12 +1,12 @@
--- src/3rdparty/chromium/media/BUILD.gn.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/media/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/BUILD.gn
@@ -63,6 +63,9 @@ config("media_config") {
if (use_cras) {
defines += [ "USE_CRAS" ]
@@ -67,6 +67,9 @@ config("media_config") {
defines += [ "DLOPEN_PULSEAUDIO" ]
}
}
+ if (use_sndio) {
+ defines += [ "USE_SNDIO" ]
+ }
}
# Internal grouping of the configs necessary to support sub-folders having their
if (use_cras) {
defines += [ "USE_CRAS" ]
}

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/media/audio/audio_features.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/audio/audio_features.cc
@@ -11,7 +11,7 @@ namespace features {
// detected. It will be restarted when needed.
const base::Feature kAudioServiceOutOfProcessKillAtHang{
"AudioServiceOutOfProcessKillAtHang",
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/media/base/media_switches.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/base/media_switches.cc
@@ -346,7 +346,7 @@ const base::Feature kGav1VideoDecoder{"Gav1VideoDecode
const base::Feature kGlobalMediaControls {
"GlobalMediaControls",
#if defined(OS_WIN) || defined(OS_MACOSX) || \
- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT

View File

@ -0,0 +1,12 @@
--- src/3rdparty/chromium/media/base/status.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/base/status.cc
@@ -66,7 +66,9 @@ Status&& Status::AddCause(Status&& cause) && {
void Status::AddFrame(const base::Location& location) {
DCHECK(data_);
+#if SUPPORTS_LOCATION_BUILTINS
data_->frames.push_back(MediaSerialize(location));
+#endif
}
Status OkStatus() {

View File

@ -0,0 +1,15 @@
--- src/3rdparty/chromium/media/blink/webmediaplayer_impl.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/blink/webmediaplayer_impl.cc
@@ -280,7 +280,11 @@ void CreateAllocation(base::trace_event::ProcessMemory
auto* std_allocator = base::trace_event::MemoryDumpManager::GetInstance()
->system_allocator_pool_name();
- pmd->AddSuballocation(dump->guid(), std_allocator);
+ if (std_allocator == nullptr) {
+ pmd->AddSuballocation(dump->guid(), std::string());
+ } else {
+ pmd->AddSuballocation(dump->guid(), std_allocator);
+ }
}
} // namespace

View File

@ -1,38 +0,0 @@
--- src/3rdparty/chromium/media/gpu/chromeos/libyuv_image_processor.cc.orig 2020-04-08 09:41:36 UTC
+++ src/3rdparty/chromium/media/gpu/chromeos/libyuv_image_processor.cc
@@ -82,7 +82,7 @@ std::unique_ptr<LibYUVImageProcessor> LibYUVImageProce
// LibYUVImageProcessor supports only memory-based video frame for input.
VideoFrame::StorageType input_storage_type = VideoFrame::STORAGE_UNKNOWN;
for (auto input_type : input_config.preferred_storage_types) {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
if (input_type == VideoFrame::STORAGE_DMABUFS) {
video_frame_mapper = VideoFrameMapperFactory::CreateMapper(
input_config.fourcc.ToVideoPixelFormat(), VideoFrame::STORAGE_DMABUFS,
@@ -92,7 +92,7 @@ std::unique_ptr<LibYUVImageProcessor> LibYUVImageProce
break;
}
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
if (VideoFrame::IsStorageTypeMappable(input_type)) {
input_storage_type = input_type;
@@ -191,7 +191,7 @@ void LibYUVImageProcessor::ProcessTask(scoped_refptr<V
FrameReadyCB cb) {
DCHECK(process_thread_.task_runner()->BelongsToCurrentThread());
DVLOGF(4);
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
if (input_frame->storage_type() == VideoFrame::STORAGE_DMABUFS) {
DCHECK_NE(video_frame_mapper_.get(), nullptr);
input_frame = video_frame_mapper_->Map(std::move(input_frame));
@@ -201,7 +201,7 @@ void LibYUVImageProcessor::ProcessTask(scoped_refptr<V
return;
}
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
int res = DoConversion(input_frame.get(), output_frame.get());
if (res != 0) {

View File

@ -1,45 +0,0 @@
--- src/3rdparty/chromium/media/gpu/linux/platform_video_frame_utils.cc.orig 2020-03-16 14:04:24 UTC
+++ src/3rdparty/chromium/media/gpu/linux/platform_video_frame_utils.cc
@@ -19,16 +19,16 @@
#include "ui/gfx/linux/native_pixmap_dmabuf.h"
#include "ui/gfx/native_pixmap.h"
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
#include "gpu/ipc/common/gpu_client_ids.h"
#include "gpu/ipc/service/gpu_memory_buffer_factory.h"
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
namespace media {
namespace {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
scoped_refptr<VideoFrame> CreateVideoFrameGpu(
gpu::GpuMemoryBufferFactory* factory,
@@ -92,7 +92,7 @@ scoped_refptr<VideoFrame> CreateVideoFrameGpu(
gpu::kPlatformVideoFramePoolClientId));
return frame;
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
} // namespace
@@ -104,11 +104,11 @@ scoped_refptr<VideoFrame> CreatePlatformVideoFrame(
const gfx::Size& natural_size,
base::TimeDelta timestamp,
gfx::BufferUsage buffer_usage) {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
return CreateVideoFrameGpu(gpu_memory_buffer_factory, pixel_format,
coded_size, visible_rect, natural_size, timestamp,
buffer_usage);
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
NOTREACHED();
return nullptr;
}

View File

@ -1,4 +1,4 @@
--- src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/mojo/mojom/video_frame_mojom_traits.cc
@@ -20,9 +20,9 @@
#include "ui/gfx/mojom/buffer_types_mojom_traits.h"
@ -12,19 +12,19 @@
namespace mojo {
@@ -60,7 +60,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData(
mojo_frame->PlaneOffset(media::VideoFrame::kVPlane)));
@@ -62,7 +62,7 @@ media::mojom::VideoFrameDataPtr MakeVideoFrameData(
std::move(offsets)));
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
if (input->storage_type() == media::VideoFrame::STORAGE_DMABUFS) {
std::vector<mojo::ScopedHandle> dmabuf_fds;
std::vector<mojo::PlatformHandle> dmabuf_fds;
@@ -161,7 +161,7 @@ bool StructTraits<media::mojom::VideoFrameDataView,
shared_buffer_data.u_offset(), shared_buffer_data.v_offset(),
shared_buffer_data.y_stride(), shared_buffer_data.u_stride(),
shared_buffer_data.v_stride(), timestamp);
@@ -165,7 +165,7 @@ bool StructTraits<media::mojom::VideoFrameDataView,
shared_buffer_data.TakeFrameData(),
shared_buffer_data.frame_data_size(), std::move(offsets),
std::move(strides), timestamp);
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
} else if (data.is_dmabuf_data()) {

View File

@ -1,6 +1,6 @@
--- src/3rdparty/chromium/media/mojo/services/gpu_mojo_media_client.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/media/mojo/services/gpu_mojo_media_client.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/media/mojo/services/gpu_mojo_media_client.cc
@@ -65,7 +65,7 @@ namespace media {
@@ -62,7 +62,7 @@ namespace media {
namespace {
#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_MACOSX) || \
@ -9,12 +9,12 @@
gpu::CommandBufferStub* GetCommandBufferStub(
scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner,
base::WeakPtr<MediaGpuChannelManager> media_gpu_channel_manager,
@@ -250,7 +250,7 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::Crea
@@ -279,7 +279,7 @@ std::unique_ptr<VideoDecoder> GpuMojoMediaClient::Crea
command_buffer_id->route_id));
}
-#elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
+#elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
video_decoder = VdaVideoDecoder::Create(
task_runner, gpu_task_runner_, media_log->Clone(), target_color_space,
gpu_preferences_, gpu_workarounds_,
#if defined(OS_WIN)
// Don't instantiate the DXVA decoder if it's not supported.
if (gpu_workarounds_.disable_dxva_video_decoder)

View File

@ -1,4 +1,4 @@
--- src/3rdparty/chromium/net/BUILD.gn.orig 2020-04-08 09:41:36 UTC
--- src/3rdparty/chromium/net/BUILD.gn.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/net/BUILD.gn
@@ -103,7 +103,7 @@ net_configs = [
"//build/config/compiler:wexit_time_destructors",
@ -9,7 +9,7 @@
net_configs += [ "//build/config/linux:libresolv" ]
}
@@ -1834,6 +1834,17 @@ component("net") {
@@ -1256,6 +1256,16 @@ component("net") {
]
}
@ -19,15 +19,14 @@
+ "base/address_tracker_linux.h",
+ "base/network_change_notifier_linux.cc",
+ "base/network_change_notifier_linux.h",
+ "base/network_interfaces_linux.cc",
+ "base/network_interfaces_linux.h",
+ "base/network_interfaces_linux.cc"
+ ]
+ }
+
if (is_mac) {
sources += [
"base/network_notification_thread_mac.cc",
@@ -1960,7 +1971,7 @@ component("net") {
@@ -1386,7 +1396,7 @@ component("net") {
}
}
@ -36,7 +35,7 @@
sources += [
"base/network_change_notifier_posix.cc",
"base/network_change_notifier_posix.h",
@@ -1991,7 +2002,7 @@ component("net") {
@@ -1419,7 +1429,7 @@ component("net") {
}
# Use getifaddrs() on POSIX platforms, except Linux and Android.

View File

@ -0,0 +1,11 @@
--- src/3rdparty/chromium/net/base/features.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/net/base/features.cc
@@ -92,7 +92,7 @@ const base::Feature kBlockExternalRequestsFromNonSecur
#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
const base::Feature kCertVerifierBuiltinFeature {
"CertVerifierBuiltin",
-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT

View File

@ -1,28 +1,24 @@
--- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/net/base/network_change_notifier.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/net/base/network_change_notifier.cc
@@ -217,7 +217,6 @@ NetworkChangeNotifier* NetworkChangeNotifier::Create()
@@ -35,7 +35,7 @@
#include "net/base/network_change_notifier_linux.h"
#elif defined(OS_MACOSX)
return new NetworkChangeNotifierMac();
#include "net/base/network_change_notifier_mac.h"
-#elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
+#elif defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
#include "net/base/network_change_notifier_posix.h"
#elif defined(OS_FUCHSIA)
#include "net/base/network_change_notifier_fuchsia.h"
@@ -240,8 +240,11 @@ std::unique_ptr<NetworkChangeNotifier> NetworkChangeNo
#elif defined(OS_FUCHSIA)
return std::make_unique<NetworkChangeNotifierFuchsia>(
0 /* required_features */);
+#elif defined(OS_BSD)
+ return std::make_unique<MockNetworkChangeNotifier>(
+ std::make_unique<SystemDnsConfigChangeNotifier>(
+ nullptr /* task_runner */, nullptr /* dns_config_service */));
#else
- NOTIMPLEMENTED();
return NULL;
#endif
}
@@ -425,7 +424,7 @@ void NetworkChangeNotifier::LogOperatorCodeHistogram(C
#endif
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// static
const internal::AddressTrackerLinux*
NetworkChangeNotifier::GetAddressTracker() {
@@ -674,7 +673,7 @@ NetworkChangeNotifier::NetworkChangeNotifier(
network_change_calculator_->Init();
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
const internal::AddressTrackerLinux*
NetworkChangeNotifier::GetAddressTrackerInternal() const {
return NULL;

View File

@ -1,29 +0,0 @@
--- src/3rdparty/chromium/net/base/network_change_notifier.h.orig 2018-11-13 18:25:11 UTC
+++ src/3rdparty/chromium/net/base/network_change_notifier.h
@@ -22,7 +22,7 @@ class NetworkChangeNotifierFactory;
struct NetworkInterface;
typedef std::vector<NetworkInterface> NetworkInterfaceList;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
namespace internal {
class AddressTrackerLinux;
}
@@ -348,7 +348,7 @@ class NET_EXPORT NetworkChangeNotifier {
// a large HOSTS file.
static void GetDnsConfig(DnsConfig* config);
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Returns the AddressTrackerLinux if present.
static const internal::AddressTrackerLinux* GetAddressTracker();
#endif
@@ -499,7 +499,7 @@ class NET_EXPORT NetworkChangeNotifier {
const NetworkChangeCalculatorParams& params =
NetworkChangeCalculatorParams());
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// Returns the AddressTrackerLinux if present.
// TODO(szym): Retrieve AddressMap from NetworkState. http://crbug.com/144212
virtual const internal::AddressTrackerLinux*

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/net/proxy_resolution/proxy_resolution_service.cc.orig 2019-01-16 10:59:47 UTC
+++ src/3rdparty/chromium/net/proxy_resolution/proxy_resolution_service.cc
--- src/3rdparty/chromium/net/proxy_resolution/configured_proxy_resolution_service.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/net/proxy_resolution/configured_proxy_resolution_service.cc
@@ -47,7 +47,7 @@
#elif defined(OS_MACOSX)
#include "net/proxy_resolution/proxy_config_service_mac.h"
#include "net/proxy_resolution/proxy_resolver_mac.h"
-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#elif (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
#include "net/proxy_resolution/proxy_config_service_linux.h"
#elif defined(OS_ANDROID)
#include "net/proxy_resolution/proxy_config_service_android.h"
@ -14,11 +14,11 @@
#if defined(OS_WIN) || defined(OS_IOS) || defined(OS_MACOSX) || \
- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
+ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS))
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
constexpr net::NetworkTrafficAnnotationTag kSystemProxyConfigTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("proxy_config_system", R"(
semantics {
@@ -1538,7 +1538,7 @@ ProxyResolutionService::CreateSystemProxyConfigService
@@ -1436,7 +1436,7 @@ ConfiguredProxyResolutionService::CreateSystemProxyCon
<< "profile_io_data.cc::CreateProxyConfigService and this should "
<< "be used only for examples.";
return std::make_unique<UnsetProxyConfigService>();

View File

@ -1,11 +1,20 @@
--- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/net/url_request/url_request_context_builder.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/net/url_request/url_request_context_builder.cc
@@ -512,7 +512,7 @@ std::unique_ptr<URLRequestContext> URLRequestContextBu
@@ -485,7 +485,7 @@ std::unique_ptr<URLRequestContext> URLRequestContextBu
}
if (!proxy_resolution_service_) {
-#if !defined(OS_LINUX) && !defined(OS_ANDROID)
+#if !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD)
// TODO(willchan): Switch to using this code when
// ProxyResolutionService::CreateSystemProxyConfigService()'s signature
// doesn't suck.
// ConfiguredProxyResolutionService::CreateSystemProxyConfigService()'s
// signature doesn't suck.
@@ -494,7 +494,7 @@ std::unique_ptr<URLRequestContext> URLRequestContextBu
ConfiguredProxyResolutionService::CreateSystemProxyConfigService(
base::ThreadTaskRunnerHandle::Get().get());
}
-#endif // !defined(OS_LINUX) && !defined(OS_ANDROID)
+#endif // !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD)
proxy_resolution_service_ = CreateProxyResolutionService(
std::move(proxy_config_service_), context.get(),
context->host_resolver(), context->network_delegate(),

View File

@ -1,10 +1,11 @@
--- src/3rdparty/chromium/sandbox/features.gni.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/sandbox/features.gni.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/sandbox/features.gni
@@ -12,6 +12,6 @@ use_seccomp_bpf =
(is_linux || is_android) &&
(current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" ||
current_cpu == "arm64" || current_cpu == "mipsel" ||
- current_cpu == "mips64el")
+ current_cpu == "mips64el") && !is_bsd
use_seccomp_bpf = use_seccomp_bpf || is_nacl_nonsfi
@@ -8,7 +8,7 @@ import("//build/config/nacl/config.gni")
# currently.
# Do not disable seccomp_bpf anywhere without talking to
# security@chromium.org!
-use_seccomp_bpf = (is_linux || is_android) &&
+use_seccomp_bpf = (is_linux || is_android) && !is_bsd &&
(current_cpu == "x86" || current_cpu == "x64" ||
current_cpu == "arm" || current_cpu == "arm64" ||
current_cpu == "mipsel" || current_cpu == "mips64el")

View File

@ -1,11 +1,11 @@
--- src/3rdparty/chromium/services/network/network_context.cc.orig 2019-11-27 21:12:25 UTC
--- src/3rdparty/chromium/services/network/network_context.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/services/network/network_context.cc
@@ -1737,7 +1737,7 @@ URLRequestContextOwner NetworkContext::ApplyContextPar
@@ -1810,7 +1810,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestC
net::CookieCryptoDelegate* crypto_delegate = nullptr;
if (params_->enable_encrypted_cookies) {
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)
DCHECK(network_service_->os_crypt_config_set())
<< "NetworkService::SetCryptConfig must be called before creating a "
"NetworkContext with encrypted cookies.";

View File

@ -1,20 +1,20 @@
--- src/3rdparty/chromium/services/network/network_service.cc.orig 2018-11-13 18:25:11 UTC
--- src/3rdparty/chromium/services/network/network_service.cc.orig 2020-11-07 01:22:36 UTC
+++ src/3rdparty/chromium/services/network/network_service.cc
@@ -38,7 +38,7 @@
@@ -67,7 +67,7 @@
#include "third_party/boringssl/src/include/openssl/cpu.h"
#endif
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)) || defined(OS_BSD)
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && !BUILDFLAG(IS_CHROMECAST)
#include "components/os_crypt/key_storage_config_linux.h"
#include "components/os_crypt/os_crypt.h"
#endif
@@ -367,7 +367,7 @@ void NetworkService::UpdateSignedTreeHead(const net::c
sth_distributor_->NewSTHObserved(sth);
@@ -636,7 +636,7 @@ void NetworkService::OnCertDBChanged() {
net::CertDatabase::GetInstance()->NotifyObserversCertDBChanged();
}
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
void NetworkService::SetCryptConfig(mojom::CryptConfigPtr crypt_config) {
#if !defined(IS_CHROMECAST) && !defined(TOOLKIT_QT)
auto config = std::make_unique<os_crypt::Config>();
#if !BUILDFLAG(IS_CHROMECAST) && !defined(TOOLKIT_QT)
DCHECK(!os_crypt_config_set_);

Some files were not shown because too many files have changed in this diff Show More