From 16cefef48dc552862a2663288acbad65deade725 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 20 Jan 2021 01:34:10 +0100 Subject: [PATCH] electron7: remove --- ...musl-default-pthread-stacksize.patch.patch | 31 - .../chromium-musl-sandbox.patch.patch | 176 - ...um-musl_canonicalize_file_name.patch.patch | 13 - .../chromium-musl_cdefs.patch.patch | 45 - ...musl_define_temp_failure_retry.patch.patch | 18 - .../chromium-musl_dns.patch.patch | 61 - .../chromium-musl_exeinfo.patch.patch | 96 - .../chromium-musl_fpstate_t.patch.patch | 48 - .../chromium-musl_getcontext.patch.patch | 25 - .../chromium-musl_mallinfo.patch.patch | 61 - .../chromium-musl_pread_pwrite64.patch.patch | 18 - .../chromium-musl_push_back.patch.patch | 13 - .../chromium-musl_si_fields.patch.patch | 13 - .../chromium-musl_stack_size.patch.patch | 41 - .../chromium-musl_stack_trace.patch.patch | 44 - .../chromium-musl_tcp_listen.patch.patch | 14 - .../chromium-musl_wordsize.patch.patch | 24 - .../chromium-musl_xxx_ppc64le.patch | 187 - ...um-001-upstream_chrome_cleaner.patch.patch | 73 - ..._logs_from_test_cild_processes.patch.patch | 342 -- ...pstream_move_child_process_log.patch.patch | 730 --- ...pstream_use_childprocesslogger.patch.patch | 186 - ...-005-upstream-chromium_version.patch.patch | 26 - .../files/patches/chromium-77-clang.patch | 13 - .../patches/chromium-77-pulseaudio-13.patch | 82 - .../patches/chromium-77-system-icu.patch | 20 - .../patches/chromium-78-gcc-alignas.patch | 102 - .../patches/chromium-78-gcc-enum-range.patch | 46 - .../patches/chromium-78-gcc-noexcept.patch | 32 - .../files/patches/chromium-78-icon.patch | 12 - .../files/patches/chromium-78-include.patch | 40 - .../files/patches/chromium-78-pm-crash.patch | 43 - .../patches/chromium-78-protobuf-export.patch | 13 - .../chromium-78-revert-noexcept-r1.patch | 1471 ------ ...romium-79-gcc-ambiguous-nodestructor.patch | 39 - .../patches/chromium-79-gcc-includes.patch | 102 - .../patches/chromium-79-gcc-status-enum.patch | 31 - .../files/patches/chromium-79-icu-65.patch | 13 - .../files/patches/chromium-79-icu-67.patch | 167 - ...chromium-chromium_atk_optional.patch.patch | 17 - .../chromium-clang10_glslang.patch.patch | 25 - .../files/patches/chromium-compiler-r10.patch | 185 - .../patches/chromium-fix-char_traits.patch | 14 - .../chromium-fix-commandline-include.patch | 44 - .../chromium-fix-sucess-definition.patch | 15 - .../files/patches/chromium-gcc-lto.patch | 131 - .../files/patches/chromium-gcc-shared.patch | 20 - .../patches/chromium-gn_bootstrap_ninja.patch | 32 - .../files/patches/chromium-libc_malloc.patch | 26 - .../patches/chromium-toolchain-host.patch | 11 - .../patches/chromium-unbundle-zlib-r1.patch | 13 - ...3-files-to-have-a-start-time-of-zero.patch | 38 - .../files/patches/chromium-xxx-ppc64le.patch | 4141 ----------------- ...a-script-to-list-patch-targets.patch.patch | 42 - .../patches/electron-Build-fixes.patch.patch | 57 - ...ectron-dont-assume-python-is-python2.patch | 17 - .../files/patches/electron-fix-includes.patch | 19 - .../electron-mjsunit-not-exsit.patch.patch | 47 - srcpkgs/electron7/template | 341 -- srcpkgs/electron7/update | 2 - 60 files changed, 9748 deletions(-) delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl-default-pthread-stacksize.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl-sandbox.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_canonicalize_file_name.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_cdefs.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_define_temp_failure_retry.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_dns.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_exeinfo.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_fpstate_t.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_getcontext.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_mallinfo.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_pread_pwrite64.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_push_back.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_si_fields.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_stack_size.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_stack_trace.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_tcp_listen.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_wordsize.patch.patch delete mode 100644 srcpkgs/electron7/files/musl-patches/chromium-musl_xxx_ppc64le.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-001-upstream_chrome_cleaner.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-002-upstream_save_logs_from_test_cild_processes.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-003-upstream_move_child_process_log.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-004-upstream_use_childprocesslogger.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-005-upstream-chromium_version.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-77-clang.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-77-pulseaudio-13.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-77-system-icu.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-gcc-alignas.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-gcc-enum-range.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-gcc-noexcept.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-icon.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-include.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-pm-crash.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-protobuf-export.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-78-revert-noexcept-r1.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-79-gcc-ambiguous-nodestructor.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-79-gcc-includes.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-79-gcc-status-enum.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-79-icu-65.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-79-icu-67.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-chromium_atk_optional.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-clang10_glslang.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-compiler-r10.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-fix-char_traits.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-fix-commandline-include.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-fix-sucess-definition.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-gcc-lto.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-gcc-shared.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-gn_bootstrap_ninja.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-libc_malloc.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-toolchain-host.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-unbundle-zlib-r1.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-upstream-force-mp3-files-to-have-a-start-time-of-zero.patch delete mode 100644 srcpkgs/electron7/files/patches/chromium-xxx-ppc64le.patch delete mode 100644 srcpkgs/electron7/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/electron-Build-fixes.patch.patch delete mode 100644 srcpkgs/electron7/files/patches/electron-dont-assume-python-is-python2.patch delete mode 100644 srcpkgs/electron7/files/patches/electron-fix-includes.patch delete mode 100644 srcpkgs/electron7/files/patches/electron-mjsunit-not-exsit.patch.patch delete mode 100644 srcpkgs/electron7/template delete mode 100644 srcpkgs/electron7/update diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl-default-pthread-stacksize.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl-default-pthread-stacksize.patch.patch deleted file mode 100644 index d0c1361b8ed..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl-default-pthread-stacksize.patch.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc -index 095c49b..5044bb8 100644 ---- a/base/threading/platform_thread_linux.cc -+++ b/base/threading/platform_thread_linux.cc -@@ -186,7 +186,7 @@ void TerminateOnThread() {} - - size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { - #if !defined(THREAD_SANITIZER) -- return 0; -+ return (1 << 23); - #else - // ThreadSanitizer bloats the stack heavily. Evidence has been that the - // default stack size isn't enough for some browser tests. -diff --git a/chrome/app/shutdown_signal_handlers_posix.cc b/chrome/app/shutdown_signal_handlers_posix.cc -index 621d441..be21106 100644 ---- a/chrome/app/shutdown_signal_handlers_posix.cc -+++ b/chrome/app/shutdown_signal_handlers_posix.cc -@@ -187,11 +187,11 @@ void InstallShutdownSignalHandlers( - g_shutdown_pipe_read_fd = pipefd[0]; - g_shutdown_pipe_write_fd = pipefd[1]; - #if !defined(ADDRESS_SANITIZER) -- const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2; -+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 *8; - #else - // ASan instrumentation bloats the stack frames, so we need to increase the - // stack size to avoid hitting the guard page. -- const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4; -+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 *8; - #endif - ShutdownDetector* detector = new ShutdownDetector( - g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner); diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl-sandbox.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl-sandbox.patch.patch deleted file mode 100644 index f485f6cc75a..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl-sandbox.patch.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -index 348ab6e..4550f9e 100644 ---- ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -@@ -139,21 +139,11 @@ namespace sandbox { - // present (as in newer versions of posix_spawn). - ResultExpr RestrictCloneToThreadsAndEPERMFork() { - const Arg flags(0); -- -- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2. -- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES | -- CLONE_SIGHAND | CLONE_THREAD | -- CLONE_SYSVSEM; -- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED; -- -- const uint64_t kGlibcPthreadFlags = -- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | -- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID; -- const BoolExpr glibc_test = flags == kGlibcPthreadFlags; -- -- const BoolExpr android_test = -- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, -- flags == kGlibcPthreadFlags); -+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | -+ CLONE_THREAD | CLONE_SYSVSEM; -+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | -+ CLONE_DETACHED; -+ const BoolExpr thread_clone_ok = (flags&~safe)==required; - - // The following two flags are the two important flags in any vfork-emulating - // clone call. EPERM any clone call that contains both of them. -@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() { - AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0, - (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags); - -- return If(IsAndroid() ? android_test : glibc_test, Allow()) -+ return If(thread_clone_ok, Allow()) - .ElseIf(is_fork_or_clone_vfork, Error(EPERM)) - .Else(CrashSIGSYSClone()); - } -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index 7dbcc87..589262f 100644 ---- ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -391,6 +391,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { - #if defined(__i386__) - case __NR_waitpid: - #endif -+ case __NR_set_tid_address: - return true; - case __NR_clone: // Should be parameter-restricted. - case __NR_setns: // Privileged. -@@ -403,7 +404,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) - case __NR_set_thread_area: - #endif -- case __NR_set_tid_address: - case __NR_unshare: - #if !defined(__mips__) && !defined(__aarch64__) - case __NR_vfork: -@@ -513,6 +513,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { - case __NR_mlock: - case __NR_munlock: - case __NR_munmap: -+ case __NR_mremap: -+ case __NR_membarrier: - return true; - case __NR_madvise: - case __NR_mincore: -@@ -530,7 +532,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { - case __NR_modify_ldt: - #endif - case __NR_mprotect: -- case __NR_mremap: - case __NR_msync: - case __NR_munlockall: - case __NR_readahead: -diff --git a/sandbox/linux/system_headers/arm64_linux_syscalls.h b/sandbox/linux/system_headers/arm64_linux_syscalls.h -index 59d0eab..7ae7002 100644 ---- ./sandbox/linux/system_headers/arm64_linux_syscalls.h -+++ ./sandbox/linux/system_headers/arm64_linux_syscalls.h -@@ -1063,4 +1063,8 @@ - #define __NR_memfd_create 279 - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier 283 -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_ -diff --git a/sandbox/linux/system_headers/arm_linux_syscalls.h b/sandbox/linux/system_headers/arm_linux_syscalls.h -index 1addd53..7843b5e 100644 ---- ./sandbox/linux/system_headers/arm_linux_syscalls.h -+++ ./sandbox/linux/system_headers/arm_linux_syscalls.h -@@ -1385,6 +1385,10 @@ - #define __NR_memfd_create (__NR_SYSCALL_BASE+385) - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier (__NR_SYSCALL_BASE+389) -+#endif -+ - // ARM private syscalls. - #if !defined(__ARM_NR_BASE) - #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) -diff --git a/sandbox/linux/system_headers/mips64_linux_syscalls.h b/sandbox/linux/system_headers/mips64_linux_syscalls.h -index ec75815..612fcfa 100644 ---- ./sandbox/linux/system_headers/mips64_linux_syscalls.h -+++ ./sandbox/linux/system_headers/mips64_linux_syscalls.h -@@ -1271,4 +1271,8 @@ - #define __NR_memfd_create (__NR_Linux + 314) - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier (__NR_Linux + 318) -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS64_LINUX_SYSCALLS_H_ -diff --git a/sandbox/linux/system_headers/mips_linux_syscalls.h b/sandbox/linux/system_headers/mips_linux_syscalls.h -index ddbf97f..1742acd 100644 ---- ./sandbox/linux/system_headers/mips_linux_syscalls.h -+++ ./sandbox/linux/system_headers/mips_linux_syscalls.h -@@ -1433,4 +1433,8 @@ - #define __NR_memfd_create (__NR_Linux + 354) - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier (__NR_Linux + 358) -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ -diff --git a/sandbox/linux/system_headers/x86_32_linux_syscalls.h b/sandbox/linux/system_headers/x86_32_linux_syscalls.h -index a6afc62..7ed0a3b 100644 ---- ./sandbox/linux/system_headers/x86_32_linux_syscalls.h -+++ ./sandbox/linux/system_headers/x86_32_linux_syscalls.h -@@ -1422,5 +1422,9 @@ - #define __NR_memfd_create 356 - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier 375 -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_ - -diff --git a/sandbox/linux/system_headers/x86_64_linux_syscalls.h b/sandbox/linux/system_headers/x86_64_linux_syscalls.h -index 349504a..ea3c7c9 100644 ---- ./sandbox/linux/system_headers/x86_64_linux_syscalls.h -+++ ./sandbox/linux/system_headers/x86_64_linux_syscalls.h -@@ -1290,5 +1290,9 @@ - #define __NR_memfd_create 319 - #endif - -+#if !defined(__NR_membarrier) -+#define __NR_membarrier 324 -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_64_LINUX_SYSCALLS_H_ - -diff --git a/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc b/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -index 017f13c..50aeec3 100644 ---- ./services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -+++ ./services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -@@ -88,10 +88,10 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const { - case __NR_sysinfo: - case __NR_times: - case __NR_uname: -- return Allow(); -- case __NR_sched_getaffinity: - case __NR_sched_getparam: - case __NR_sched_getscheduler: -+ return Allow(); -+ case __NR_sched_getaffinity: - case __NR_sched_setscheduler: - return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); - case __NR_prlimit64: diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_canonicalize_file_name.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_canonicalize_file_name.patch.patch deleted file mode 100644 index 05614daa757..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_canonicalize_file_name.patch.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/nasm/config/config-linux.h b/third_party/nasm/config/config-linux.h -index 7eb7c20..882b736 100644 ---- a/third_party/nasm/config/config-linux.h -+++ b/third_party/nasm/config/config-linux.h -@@ -117,7 +117,7 @@ - #define HAVE_ACCESS 1 - - /* Define to 1 if you have the `canonicalize_file_name' function. */ --#define HAVE_CANONICALIZE_FILE_NAME 1 -+/* #undef HAVE_CANONICALIZE_FILE_NAME */ - - /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */ - /* #undef HAVE_CPU_TO_LE16 */ diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_cdefs.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_cdefs.patch.patch deleted file mode 100644 index fc7dc06ff21..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_cdefs.patch.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/base/allocator/allocator_shim_internals.h b/base/allocator/allocator_shim_internal -s.h -index 0196f89..bb42b5d 100644 ---- a/base/allocator/allocator_shim_internals.h -+++ b/base/allocator/allocator_shim_internals.h -@@ -7,7 +7,9 @@ - - #if defined(__GNUC__) - -+#if defined(__GLIBC__) - #include // for __THROW -+#endif - - #ifndef __THROW // Not a glibc system - #ifdef _NOEXCEPT // LLVM libc++ uses noexcept instead -diff --git a/third_party/libsync/src/include/sync/sync.h b/third_party/libsync/src/include/sync/sync.h -index 50ed0ac..7552a49 100644 ---- a/third_party/libsync/src/include/sync/sync.h -+++ b/third_party/libsync/src/include/sync/sync.h -@@ -19,12 +19,13 @@ - #ifndef __SYS_CORE_SYNC_H - #define __SYS_CORE_SYNC_H - --#include - #include - - #include - --__BEGIN_DECLS -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ - - struct sync_legacy_merge_data { - int32_t fd2; -@@ -158,6 +159,8 @@ struct sync_pt_info *sync_pt_info(struct sync_fence_info_data *info, - struct sync_pt_info *itr); - void sync_fence_info_free(struct sync_fence_info_data *info); - --__END_DECLS -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ - - #endif /* __SYS_CORE_SYNC_H */ diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_define_temp_failure_retry.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_define_temp_failure_retry.patch.patch deleted file mode 100644 index 61db658f849..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_define_temp_failure_retry.patch.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/sandbox/linux/suid/sandbox.c 2019-11-19 09:28:05.000000000 +0800 -+++ b/sandbox/linux/suid/sandbox.c 2020-04-24 11:50:12.719880728 +0800 -@@ -42,6 +42,15 @@ - #define CLONE_NEWNET 0x40000000 - #endif - -+#ifndef TEMP_FAILURE_RETRY -+#define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ - static bool DropRoot(); - - #define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x) diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_dns.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_dns.patch.patch deleted file mode 100644 index f49d8bd0afa..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_dns.patch.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 2f94832..2dd1a98 100644 ---- a/net/dns/dns_config_service_posix.cc -+++ b/net/dns/dns_config_service_posix.cc -@@ -150,7 +150,7 @@ ConfigParsePosixResult ReadDnsConfig(DnsConfig* dns_config) { - #if !defined(OS_ANDROID) - ConfigParsePosixResult result; - // TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia. --#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) -+#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || (defined(OS_LINUX) && !defined(__GLIBC__)) - // Note: res_ninit in glibc always returns 0 and sets RES_INIT. - // res_init behaves the same way. - memset(&_res, 0, sizeof(_res)); -@@ -173,7 +173,7 @@ ConfigParsePosixResult ReadDnsConfig(DnsConfig* dns_config) { - #else - res_nclose(&res); - #endif // defined(OS_MACOSX) || defined(OS_FREEBSD) --#endif // defined(OS_OPENBSD) -+#endif // defined(OS_OPENBSD) || defined(OS_FUCHSIA) || (defined(OS_LINUX) && !defined(__GLIBC__)) - - #if defined(OS_MACOSX) && !defined(OS_IOS) - ConfigParsePosixResult error = DnsConfigWatcher::CheckDnsConfig(); -diff --git a/net/dns/dns_reloader.cc b/net/dns/dns_reloader.cc -index 952cff4..4b366f4 100644 ---- a/net/dns/dns_reloader.cc -+++ b/net/dns/dns_reloader.cc -@@ -4,7 +4,7 @@ - - #include "net/dns/dns_reloader.h" - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -+#if defined(OS_POSIX) && defined(__GLIBC__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) && !defined(OS_FUCHSIA) - - #include -diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc -index e8dea46..c86a830 100644 ---- a/net/dns/host_resolver_manager.cc -+++ b/net/dns/host_resolver_manager.cc -@@ -2386,7 +2386,7 @@ HostResolverManager::HostResolverManager( - NetworkChangeNotifier::AddConnectionTypeObserver(this); - if (system_dns_config_notifier_) - system_dns_config_notifier_->AddObserver(this); --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -+#if defined(OS_POSIX) && defined(__GLIBC__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) - EnsureDnsReloaderInit(); - #endif -diff --git a/net/dns/host_resolver_proc.cc b/net/dns/host_resolver_proc.cc -index 0824540..3384978 100644 ---- a/net/dns/host_resolver_proc.cc -+++ b/net/dns/host_resolver_proc.cc -@@ -197,7 +197,7 @@ int SystemHostResolverCall(const std::string& host, - base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, - base::BlockingType::WILL_BLOCK); - --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ -+#if defined(OS_POSIX) && defined(__GLIBC__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) && !defined(OS_FUCHSIA) - DnsReloaderMaybeReload(); - #endif diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_exeinfo.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_exeinfo.patch.patch deleted file mode 100644 index f1afc7c1b17..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_exeinfo.patch.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc -index de2f356..f697c66 100644 ---- a/base/debug/stack_trace_posix.cc -+++ b/base/debug/stack_trace_posix.cc -@@ -27,7 +27,7 @@ - #if !defined(USE_SYMBOLIZE) - #include - #endif --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - #include - #endif - -@@ -86,7 +86,7 @@ void DemangleSymbols(std::string* text) { - // Note: code in this function is NOT async-signal safe (std::string uses - // malloc internally). - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - std::string::size_type search_from = 0; - while (search_from < text->size()) { - // Look for the start of a mangled symbol, from search_from. -@@ -121,7 +121,7 @@ void DemangleSymbols(std::string* text) { - search_from = mangled_start + 2; - } - } --#endif // !defined(__UCLIBC__) && !defined(_AIX) -+#endif // defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - } - #endif // !defined(USE_SYMBOLIZE) - -@@ -133,7 +133,7 @@ class BacktraceOutputHandler { - virtual ~BacktraceOutputHandler() = default; - }; - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { - // This should be more than enough to store a 64-bit number in hex: - // 16 hex digits + 1 for null-terminator. -@@ -216,7 +216,7 @@ void ProcessBacktrace(void* const* trace, - } - #endif // defined(USE_SYMBOLIZE) - } --#endif // !defined(__UCLIBC__) && !defined(_AIX) -+#endif // defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - - void PrintToStderr(const char* output) { - // NOTE: This code MUST be async-signal safe (it's used by in-process -@@ -828,7 +828,7 @@ size_t CollectStackTrace(void** trace, size_t count) { - // NOTE: This code MUST be async-signal safe (it's used by in-process - // stack dumping signal handler). NO malloc or stdio is allowed here. - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - // Though the backtrace API man page does not list any possible negative - // return values, we take no chance. - return base::saturated_cast(backtrace(trace, count)); -@@ -841,13 +841,13 @@ void StackTrace::PrintWithPrefix(const char* prefix_string) const { - // NOTE: This code MUST be async-signal safe (it's used by in-process - // stack dumping signal handler). NO malloc or stdio is allowed here. - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - PrintBacktraceOutputHandler handler; - ProcessBacktrace(trace_, count_, prefix_string, &handler); - #endif - } - --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - void StackTrace::OutputToStreamWithPrefix(std::ostream* os, - const char* prefix_string) const { - StreamBacktraceOutputHandler handler(os); -diff --git a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h -index 798f150..97acc7c 100644 ---- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h -+++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h -@@ -14,7 +14,7 @@ - #define ENABLE_CRASH_OVERRIDES 1 - - /* Define to 1 if you have the `backtrace' function. */ --#define HAVE_BACKTRACE 1 -+/* #undef HAVE_BACKTRACE */ - - /* Define to 1 if you have the header file. */ - /* #undef HAVE_CRASHREPORTERCLIENT_H */ -@@ -55,7 +55,7 @@ - #define HAVE_ERRNO_H 1 - - /* Define to 1 if you have the header file. */ --#define HAVE_EXECINFO_H 1 -+/* #undef HAVE_EXECINFO_H */ - - /* Define to 1 if you have the header file. */ - #define HAVE_FCNTL_H 1 diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_fpstate_t.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_fpstate_t.patch.patch deleted file mode 100644 index d8c41ccd9a0..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_fpstate_t.patch.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -index 6ee6cc1..a8f9ccc 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp) { -+ const struct _fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_X86_FULL | -@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fpregs) { -+ const struct _fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -index f830618..f3dde1f 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -50,7 +50,7 @@ struct UContextReader { - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp); -+ const struct _fpstate* fp); - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -index d1dc331..d1cc562 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -@@ -48,7 +48,7 @@ class ExceptionHandler; - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) --typedef struct _libc_fpstate fpstate_t; -+typedef struct _fpstate fpstate_t; - #endif - - // These entries store a list of memory regions that the client wants included diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_getcontext.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_getcontext.patch.patch deleted file mode 100644 index 7697243a910..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_getcontext.patch.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -index b895f6d..4f13352 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -@@ -490,7 +490,9 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) { - siginfo.si_code = SI_USER; - siginfo.si_pid = getpid(); - ucontext_t context; -+#if defined(__GLIBC__) - getcontext(&context); -+#endif - return HandleSignal(sig, &siginfo, &context); - } - -@@ -675,8 +677,10 @@ bool ExceptionHandler::WriteMinidump() { - sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); - - CrashContext context; -+#if defined(__GLIBC__) - int getcontext_result = getcontext(&context.context); - if (getcontext_result) -+#endif - return false; - - #if defined(__i386__) diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_mallinfo.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_mallinfo.patch.patch deleted file mode 100644 index 941313e4939..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_mallinfo.patch.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/base/process/process_metrics_posix.cc b/base/process/process_metrics_posix.cc -index 044bd8d..0521321 100644 ---- a/base/process/process_metrics_posix.cc -+++ b/base/process/process_metrics_posix.cc -@@ -110,14 +110,14 @@ size_t ProcessMetrics::GetMallocUsage() { - malloc_statistics_t stats = {0}; - malloc_zone_statistics(nullptr, &stats); - return stats.size_in_use; --#elif defined(OS_LINUX) || defined(OS_ANDROID) -+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID) - struct mallinfo minfo = mallinfo(); - #if BUILDFLAG(USE_TCMALLOC) - return minfo.uordblks; - #else - return minfo.hblkhd + minfo.arena; - #endif --#elif defined(OS_FUCHSIA) -+#else - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #endif -diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc -index e89597c..eca258c 100644 ---- a/base/trace_event/malloc_dump_provider.cc -+++ b/base/trace_event/malloc_dump_provider.cc -@@ -132,7 +132,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - } - #elif defined(OS_FUCHSIA) - // TODO(fuchsia): Port, see https://crbug.com/706592. --#else -+#elif defined(OS_LINUX) && defined(__GLIBC__) - struct mallinfo info = mallinfo(); - DCHECK_GE(info.arena + info.hblkhd, info.uordblks); - -diff --git a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h -index aa98242..97acc7c 100644 ---- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h -+++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h -@@ -130,7 +130,7 @@ - /* #undef HAVE_MALLCTL */ - - /* Define to 1 if you have the `mallinfo' function. */ --#define HAVE_MALLINFO 1 -+/* #undef HAVE_MALLINFO */ - - /* Define to 1 if you have the header file. */ - #define HAVE_MALLOC_H 1 -diff --git a/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h b/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h -index 6e17020..d4a9ed0 100644 ---- a/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h -+++ b/third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h -@@ -122,7 +122,7 @@ - /* #undef HAVE_MALLCTL */ - - /* Define to 1 if you have the `mallinfo' function. */ --#define HAVE_MALLINFO 1 -+/* #undef HAVE_MALLINFO */ - - /* Define to 1 if you have the header file. */ - #define HAVE_MALLOC_H 1 - diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_pread_pwrite64.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_pread_pwrite64.patch.patch deleted file mode 100644 index 2aeaaeb7593..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_pread_pwrite64.patch.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/third_party/lss/linux_syscall_support.h b/third_party/lss/linux_syscall_support.h -index 5d9c2e8..2682349 100644 ---- a/third_party/lss/linux_syscall_support.h -+++ b/third_party/lss/linux_syscall_support.h -@@ -166,6 +166,13 @@ extern "C" { - # undef __NR_waitpid - #endif - -+#ifdef pread64 -+#undef pread64 -+#endif -+#ifdef pwrite64 -+#undef pwrite64 -+#endif -+ - /* As glibc often provides subtly incompatible data structures (and implicit - * wrapper functions that convert them), we provide our own kernel data - * structures for use by the system calls. diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_push_back.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_push_back.patch.patch deleted file mode 100644 index cff340287da..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_push_back.patch.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/net/socket/udp_socket_posix.cc b/net/socket/udp_socket_posix.cc -index 08bf79c..3ee5353 100644 ---- a/net/socket/udp_socket_posix.cc -+++ b/net/socket/udp_socket_posix.cc -@@ -1194,7 +1194,7 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( - msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); - msgvec->reserve(buffers.size()); - for (size_t j = 0; j < buffers.size(); j++) -- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); -+ msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, 0, nullptr, 0, 0, 0}, 0}); - int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); - SendResult send_result(0, 0, std::move(buffers)); - if (result < 0) { diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_si_fields.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_si_fields.patch.patch deleted file mode 100644 index fdbefd27e2b..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_si_fields.patch.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc -index 003708d..b21414f 100644 ---- a/sandbox/linux/seccomp-bpf/trap.cc -+++ b/sandbox/linux/seccomp-bpf/trap.cc -@@ -168,7 +168,7 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { - // most versions of glibc don't include this information in siginfo_t. So, - // we need to explicitly copy it into a arch_sigsys structure. - struct arch_sigsys sigsys; -- memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); -+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); - - #if defined(__mips__) - // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_stack_size.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_stack_size.patch.patch deleted file mode 100644 index a4df7a3729b..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_stack_size.patch.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/third_party/blink/renderer/platform/wtf/stack_util.cc b/third_party/blink/renderer/platform/wtf/stack_util.cc -index b242164..1a0b519 100644 ---- a/third_party/blink/renderer/platform/wtf/stack_util.cc -+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc -@@ -29,7 +29,7 @@ size_t GetUnderestimatedStackSize() { - // FIXME: On Mac OSX and Linux, this method cannot estimate stack size - // correctly for the main thread. - --#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ - defined(OS_FUCHSIA) - // pthread_getattr_np() can fail if the thread is not invoked by - // pthread_create() (e.g., the main thread of blink_unittests). -@@ -55,6 +55,9 @@ size_t GetUnderestimatedStackSize() { - pthread_attr_destroy(&attr); - #endif - -+#if defined(OS_LINUX) && !defined(__GLIBC__) -+ return 0; -+#else - // Return a 512k stack size, (conservatively) assuming the following: - // - that size is much lower than the pthreads default (x86 pthreads has a 2M - // default.) -@@ -62,6 +65,8 @@ size_t GetUnderestimatedStackSize() { - // low as 512k. - // - return 512 * 1024; -+#endif -+ - #elif defined(OS_MACOSX) - // pthread_get_stacksize_np() returns too low a value for the main thread on - // OSX 10.9, -@@ -97,7 +102,7 @@ return Threading::ThreadStackSize(); - } - - void* GetStackStart() { --#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ - defined(OS_FUCHSIA) - pthread_attr_t attr; - int error; diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_stack_trace.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_stack_trace.patch.patch deleted file mode 100644 index 9a1f2b04458..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_stack_trace.patch.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc -index d8ca822..ffe1f08 100644 ---- a/base/debug/stack_trace.cc -+++ b/base/debug/stack_trace.cc -@@ -225,7 +225,9 @@ void StackTrace::Print() const { - } - - void StackTrace::OutputToStream(std::ostream* os) const { -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - OutputToStreamWithPrefix(os, nullptr); -+#endif - } - - std::string StackTrace::ToString() const { -@@ -233,14 +233,14 @@ std::string StackTrace::ToString() const { - } - std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const { - std::stringstream stream; --#if !defined(__UCLIBC__) && !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(_AIX) - OutputToStreamWithPrefix(&stream, prefix_string); - #endif - return stream.str(); - } - - std::ostream& operator<<(std::ostream& os, const StackTrace& s) { --#if !defined(__UCLIBC__) & !defined(_AIX) -+#if defined(__GLIBC__) && !defined(__UCLIBC__) & !defined(_AIX) - s.OutputToStream(&os); - #else - os << "StackTrace::OutputToStream not implemented."; -diff --git a/base/logging.cc b/base/logging.cc -index 36b8bfc..dd830fe 100644 ---- a/base/logging.cc -+++ b/base/logging.cc -@@ -607,7 +607,7 @@ LogMessage::LogMessage(const char* file, int line, LogSeverity severity, - LogMessage::~LogMessage() { - size_t stack_start = stream_.tellp(); - #if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \ -- !defined(OS_AIX) -+ !defined(OS_AIX) && defined(__GLIBC__) - if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) { - // Include a stack trace on a fatal, unless a debugger is attached. - base::debug::StackTrace stack_trace; diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_tcp_listen.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_tcp_listen.patch.patch deleted file mode 100644 index fa62317b11a..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_tcp_listen.patch.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/content/public/common/socket_permission_request.h b/content/public/common/socket_permission_request.h -index 7316621..6171219 100644 ---- a/content/public/common/socket_permission_request.h -+++ b/content/public/common/socket_permission_request.h -@@ -9,6 +9,9 @@ - - #include - -+#ifdef TCP_LISTEN -+#undef TCP_LISTEN -+#endif - - namespace content { - diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_wordsize.patch.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_wordsize.patch.patch deleted file mode 100644 index 6208cffafbe..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_wordsize.patch.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -index d03c7a8..78ca9dd 100644 ---- a/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -+++ b/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -@@ -36,6 +36,7 @@ - #include - #include - #include -+#include - - #include "common/memory_range.h" - -@@ -51,9 +52,9 @@ class ElfCoreDump { - typedef ElfW(Phdr) Phdr; - typedef ElfW(Word) Word; - typedef ElfW(Addr) Addr; --#if __WORDSIZE == 32 -+#if ULONG_MAX == 0xffffffff - static const int kClass = ELFCLASS32; --#elif __WORDSIZE == 64 -+#elif ULONG_MAX == 0xffffffffffffffff - static const int kClass = ELFCLASS64; - #else - #error "Unsupported __WORDSIZE for ElfCoreDump." diff --git a/srcpkgs/electron7/files/musl-patches/chromium-musl_xxx_ppc64le.patch b/srcpkgs/electron7/files/musl-patches/chromium-musl_xxx_ppc64le.patch deleted file mode 100644 index 5758a77aeea..00000000000 --- a/srcpkgs/electron7/files/musl-patches/chromium-musl_xxx_ppc64le.patch +++ /dev/null @@ -1,187 +0,0 @@ -From f1167a4390736e6f1588c497c0a0a271c71ac9b4 Mon Sep 17 00:00:00 2001 -From: Daniel Kolesa -Date: Sat, 12 Sep 2020 05:57:12 +0200 -Subject: [PATCH] ppc64le musl bits - ---- - sandbox/linux/bpf_dsl/seccomp_macros.h | 6 +++--- - sandbox/linux/seccomp-bpf/syscall.cc | 4 ++-- - .../abseil-cpp/absl/base/internal/unscaledcycleclock.h | 2 +- - .../src/client/linux/dump_writer_common/thread_info.cc | 7 +++++-- - .../src/client/linux/dump_writer_common/ucontext_reader.cc | 7 +++++-- - .../breakpad/src/client/linux/handler/exception_handler.cc | 5 +++++ - .../crashpad/crashpad/snapshot/linux/signal_context.h | 2 +- - third_party/crashpad/crashpad/util/linux/thread_info.h | 1 + - third_party/lss/linux_syscall_support.h | 4 ++++ - 9 files changed, 27 insertions(+), 11 deletions(-) - -diff --git a/sandbox/linux/bpf_dsl/seccomp_macros.h b/sandbox/linux/bpf_dsl/seccomp_macros.h -index a6aec544e0..2a4a7f1bca 100644 ---- a/sandbox/linux/bpf_dsl/seccomp_macros.h -+++ b/sandbox/linux/bpf_dsl/seccomp_macros.h -@@ -16,7 +16,7 @@ - #if defined(__mips__) - // sys/user.h in eglibc misses size_t definition - #include --#elif defined(__powerpc64__) -+#elif defined(__powerpc64__) && defined(__GLIBC__) - // Manually define greg_t on ppc64 - typedef unsigned long long greg_t; - #endif -@@ -361,11 +361,11 @@ typedef struct pt_regs regs_struct; - #define SECCOMP_ARCH AUDIT_ARCH_PPC64 - #endif - --#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg]) -+#define SECCOMP_REG(_ctx, _reg) (((struct pt_regs *)(_ctx)->uc_mcontext.regs)->gpr[_reg]) - - #define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3) - #define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0) --#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip -+#define SECCOMP_IP(_ctx) ((struct pt_regs *)(_ctx)->uc_mcontext.regs)->nip - #define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3) - #define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4) - #define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5) -diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc -index 10fa5fd070..30b7b3851f 100644 ---- a/sandbox/linux/seccomp-bpf/syscall.cc -+++ b/sandbox/linux/seccomp-bpf/syscall.cc -@@ -497,9 +497,9 @@ void Syscall::PutValueInUcontext(intptr_t ret_val, ucontext_t* ctx) { - // Same as MIPS, need to invert ret and set error register (cr0.SO) - if (ret_val <= -1 && ret_val >= -4095) { - ret_val = -ret_val; -- ctx->uc_mcontext.regs->ccr |= (1 << 28); -+ ((struct pt_regs *)ctx->uc_mcontext.regs)->ccr |= (1 << 28); - } else { -- ctx->uc_mcontext.regs->ccr &= ~(1 << 28); -+ ((struct pt_regs *)ctx->uc_mcontext.regs)->ccr &= ~(1 << 28); - } - #endif - SECCOMP_RESULT(ctx) = static_cast(ret_val); -diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h -index 2d361e9628..98242096cd 100644 ---- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h -+++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h -@@ -46,7 +46,7 @@ - - // The following platforms have an implementation of a hardware counter. - #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ -- defined(__powerpc__) || defined(__ppc__) || \ -+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ - defined(_M_IX86) || defined(_M_X64) - #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 - #else -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -index 03afec7a58..0264ecf135 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -@@ -273,6 +273,9 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const { - - #elif defined(__powerpc64__) - -+#include -+#include -+ - uintptr_t ThreadInfo::GetInstructionPointer() const { - return mcontext.gp_regs[PT_NIP]; - } -@@ -290,9 +293,9 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const { - out->ctr = mcontext.gp_regs[PT_CTR]; - - for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++) -- out->float_save.fpregs[i] = mcontext.fp_regs[i]; -+ out->float_save.fpregs[i] = ((uint64_t *)&mcontext.fp_regs)[i]; - -- out->float_save.fpscr = mcontext.fp_regs[NFPREG-1]; -+ out->float_save.fpscr = ((uint64_t *)&mcontext.fp_regs)[ELF_NFPREG-1]; - - for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) - out->vector_save.save_vr[i] = \ -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -index 7620cf6f79..54e373611f 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -257,6 +257,9 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { - - #elif defined(__powerpc64__) - -+#include -+#include -+ - uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]; - } -@@ -280,9 +283,9 @@ void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc, - out->ctr = uc->uc_mcontext.gp_regs[PT_CTR]; - - for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++) -- out->float_save.fpregs[i] = uc->uc_mcontext.fp_regs[i]; -+ out->float_save.fpregs[i] = ((uint64_t *)&uc->uc_mcontext.fp_regs)[i]; - -- out->float_save.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1]; -+ out->float_save.fpscr = ((uint64_t *)&uc->uc_mcontext.fp_regs)[ELF_NFPREG-1]; - - for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) - out->vector_save.save_vr[i] = -diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -index 826c9e0c21..9bb4f6a3e4 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -@@ -105,6 +105,11 @@ - #define PR_SET_PTRACER 0x59616d61 - #endif - -+/* musl hack, can't include asm/ptrace.h as that causes conflicts */ -+#if defined(__powerpc64__) && !defined(PT_NIP) -+#define PT_NIP 32 -+#endif -+ - namespace google_breakpad { - - namespace { -diff --git a/third_party/crashpad/crashpad/snapshot/linux/signal_context.h b/third_party/crashpad/crashpad/snapshot/linux/signal_context.h -index a1f2da2591..e6a5bd72ab 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/signal_context.h -+++ b/third_party/crashpad/crashpad/snapshot/linux/signal_context.h -@@ -469,7 +469,7 @@ struct MContext64 { - SignalThreadContext64 gp_regs; - SignalFloatContext64 fp_regs; - SignalVectorContext64 *v_regs; -- int64_t vmx_reserve[69]; -+ int64_t vmx_reserve[101]; - }; - - struct ContextTraits64 : public Traits64 { -diff --git a/third_party/crashpad/crashpad/util/linux/thread_info.h b/third_party/crashpad/crashpad/util/linux/thread_info.h -index dea0d1f39e..b203e5b2f2 100644 ---- a/third_party/crashpad/crashpad/util/linux/thread_info.h -+++ b/third_party/crashpad/crashpad/util/linux/thread_info.h -@@ -30,6 +30,7 @@ - - #if defined(ARCH_CPU_PPC64_FAMILY) - #include -+#include - #endif - - namespace crashpad { -diff --git a/third_party/lss/linux_syscall_support.h b/third_party/lss/linux_syscall_support.h -index c05710e56f..af327ea616 100644 ---- a/third_party/lss/linux_syscall_support.h -+++ b/third_party/lss/linux_syscall_support.h -@@ -4226,9 +4226,13 @@ struct kernel_statfs { - } - #endif - #if defined(__NR_fstatat64) -+ // musl does #define fstatat64 fstatat -+ #undef fstatat64 - LSS_INLINE _syscall4(int, fstatat64, int, d, - const char *, p, - struct kernel_stat64 *, b, int, f) -+ // set it back like it was -+ #define fstatat64 fstatat - #endif - #if defined(__NR_waitpid) - // waitpid is polyfilled below when not available. --- -2.28.0 - diff --git a/srcpkgs/electron7/files/patches/chromium-001-upstream_chrome_cleaner.patch.patch b/srcpkgs/electron7/files/patches/chromium-001-upstream_chrome_cleaner.patch.patch deleted file mode 100644 index 57e94180c59..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-001-upstream_chrome_cleaner.patch.patch +++ /dev/null @@ -1,73 +0,0 @@ -From c755ec847459d9d3807c22c2d4d6aa6f9c86dc7c Mon Sep 17 00:00:00 2001 -From: John Budorick -Date: Tue, 19 Nov 2019 22:24:20 +0000 -Subject: [PATCH] 3904: chrome_cleaner: ensure internal targets are reachable - from :gn_all. - -(cherry picked from commit eee513dfc780ad4bcaa74b67f2e0eaebf57b5c93) - -Bug: 984162, 1004848 -Change-Id: Ibb7c47f0188de8e077cd30aa8d68ca61133d2037 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904549 -Commit-Queue: John Budorick -Reviewed-by: Joe Mason -Cr-Original-Commit-Position: refs/heads/master@{#713683} -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922299 -Cr-Commit-Position: refs/branch-heads/3904@{#895} -Cr-Branched-From: 675968a8c657a3bd9c1c2c20c5d2935577bbc5e6-refs/heads/master@{#693954} ---- - BUILD.gn | 2 +- - chrome/chrome_cleaner/BUILD.gn | 23 ++++++++++++++++++++--- - 2 files changed, 21 insertions(+), 4 deletions(-) - -diff --git a/BUILD.gn b/BUILD.gn -index 5e2f6b9b0f41c..ac0297608594f 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -604,7 +604,7 @@ group("gn_all") { - if (is_win) { - deps += [ - "//base:pe_image_test", -- "//chrome/chrome_cleaner:chrome_cleaner_unittests", -+ "//chrome/chrome_cleaner", - "//chrome/chrome_elf:chrome_elf_unittests", - "//chrome/chrome_elf:dll_hash_main", - "//chrome/elevation_service:elevation_service_unittests", -diff --git a/chrome/chrome_cleaner/BUILD.gn b/chrome/chrome_cleaner/BUILD.gn -index fbd2d8d5307aa..1671a3f7d097c 100644 ---- a/chrome/chrome_cleaner/BUILD.gn -+++ b/chrome/chrome_cleaner/BUILD.gn -@@ -64,9 +64,6 @@ static_library("other_executable_definitions") { - } - - test("chrome_cleaner_unittests") { -- # Make this target findable from the "all" target used by the builders. -- visibility += [ "//.:gn_all" ] -- - sources = [ - "//chrome/chrome_cleaner/test/test_main.cc", - ] -@@ -126,3 +123,23 @@ test("chrome_cleaner_unittests") { - ] - } - } -+ -+group("chrome_cleaner") { -+ testonly = true -+ -+ # Make this target findable from the "all" target used by the builders. -+ visibility += [ "//.:gn_all" ] -+ -+ deps = [ -+ ":chrome_cleaner_unittests", -+ "//chrome/chrome_cleaner/executables:chrome_cleanup_tool", -+ "//chrome/chrome_cleaner/executables:software_reporter_tool", -+ ] -+ -+ if (is_internal_chrome_cleaner_build) { -+ deps += [ -+ "${chrome_cleaner_internal_root}:build_targets", -+ "${chrome_cleaner_internal_root}:test_targets", -+ ] -+ } -+} diff --git a/srcpkgs/electron7/files/patches/chromium-002-upstream_save_logs_from_test_cild_processes.patch.patch b/srcpkgs/electron7/files/patches/chromium-002-upstream_save_logs_from_test_cild_processes.patch.patch deleted file mode 100644 index 74b9fec59a7..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-002-upstream_save_logs_from_test_cild_processes.patch.patch +++ /dev/null @@ -1,342 +0,0 @@ -From daec661f27bdfab79132d7d2c4637cc17fd4aa35 Mon Sep 17 00:00:00 2001 -From: Joe Mason -Date: Wed, 4 Dec 2019 18:04:21 +0000 -Subject: [PATCH] Save logs from test child processes by redirecting stdout and - stderr. - -The previous solution can only capture logs after the child process -creates a ScopedLogging object. We see flaky crashes in sandbox creation -that happen before that so this will let us see the child process stack -traces. - -Also moves some functions that were exported from ipc_test_util.h to be -private to proto_chrome_prompt_ipc_unittest.cc, which is the only test -that still uses them. - -(cherry picked from commit e7a755421136d7fc9b3a73a5e5464368f3efa7f9) - -Bug: 1030333 -Change-Id: Ie30eed3b16631721e81a420b3b70f1ec5f0d9a0c -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948483 -Reviewed-by: proberge -Commit-Queue: Joe Mason -Cr-Original-Commit-Position: refs/heads/master@{#721071} -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951089 -Reviewed-by: Joe Mason -Cr-Commit-Position: refs/branch-heads/3904@{#913} -Cr-Branched-From: 675968a8c657a3bd9c1c2c20c5d2935577bbc5e6-refs/heads/master@{#693954} ---- - chrome/chrome_cleaner/ipc/ipc_test_util.cc | 92 ++++++++++++------- - chrome/chrome_cleaner/ipc/ipc_test_util.h | 13 ++- - .../ipc/proto_chrome_prompt_ipc_unittest.cc | 17 ++-- - chrome/chrome_cleaner/ipc/sandbox.cc | 5 +- - 4 files changed, 77 insertions(+), 50 deletions(-) - -diff --git a/chrome/chrome_cleaner/ipc/ipc_test_util.cc b/chrome/chrome_cleaner/ipc/ipc_test_util.cc -index 05fc0d027ec43..0d03a6870fb07 100644 ---- a/chrome/chrome_cleaner/ipc/ipc_test_util.cc -+++ b/chrome/chrome_cleaner/ipc/ipc_test_util.cc -@@ -13,6 +13,7 @@ - #include "base/command_line.h" - #include "base/files/file_path.h" - #include "base/files/file_util.h" -+#include "base/files/scoped_temp_dir.h" - #include "base/logging.h" - #include "base/process/launch.h" - #include "base/rand_util.h" -@@ -23,7 +24,6 @@ - #include "base/test/test_timeouts.h" - #include "base/win/win_util.h" - #include "chrome/chrome_cleaner/ipc/sandbox.h" --#include "chrome/chrome_cleaner/logging/scoped_logging.h" - #include "sandbox/win/src/sandbox_factory.h" - - namespace chrome_cleaner { -@@ -32,12 +32,13 @@ namespace { - - constexpr char kMojoPipeTokenSwitch[] = "mojo-pipe-token"; - --constexpr wchar_t kIPCTestUtilLogSuffix[] = L"ipc-test-util"; -- - class MojoSandboxSetupHooks : public SandboxSetupHooks { - public: -- explicit MojoSandboxSetupHooks(SandboxedParentProcess* parent_process) -- : parent_process_(parent_process) {} -+ explicit MojoSandboxSetupHooks( -+ SandboxedParentProcess* parent_process, -+ base::win::ScopedHandle child_stdout_write_handle) -+ : parent_process_(parent_process), -+ child_stdout_write_handle_(std::move(child_stdout_write_handle)) {} - ~MojoSandboxSetupHooks() override = default; - - // SandboxSetupHooks -@@ -49,6 +50,8 @@ class MojoSandboxSetupHooks : public SandboxSetupHooks { - parent_process_->CreateMojoPipe(command_line, &handles_to_inherit); - for (HANDLE handle : handles_to_inherit) - policy->AddHandleToShare(handle); -+ policy->SetStdoutHandle(child_stdout_write_handle_.Get()); -+ policy->SetStderrHandle(child_stdout_write_handle_.Get()); - return RESULT_CODE_SUCCESS; - } - -@@ -61,33 +64,14 @@ class MojoSandboxSetupHooks : public SandboxSetupHooks { - - private: - SandboxedParentProcess* parent_process_; -+ base::win::ScopedHandle child_stdout_write_handle_; - }; - - } // namespace - - namespace internal { - --base::FilePath::StringPieceType GetLogPathSuffix() { -- return kIPCTestUtilLogSuffix; --} -- --base::FilePath GetLogPath() { -- return ScopedLogging::GetLogFilePath(kIPCTestUtilLogSuffix); --} -- --bool DeleteChildProcessLogs() { -- // Delete the child process log file if existing. -- const base::FilePath log_path = GetLogPath(); -- if (!base::DeleteFile(log_path, false)) { -- LOG(ERROR) << "Can't delete log file from previous run: " -- << log_path.value(); -- return false; -- } -- return true; --} -- --void PrintChildProcessLogs() { -- const base::FilePath log_path = GetLogPath(); -+void PrintChildProcessLogs(const base::FilePath& log_path) { - if (log_path.empty()) { - LOG(ERROR) << "Child process log path is empty"; - return; -@@ -174,11 +158,38 @@ bool ParentProcess::LaunchConnectedChildProcess( - const std::string& child_main_function, - base::TimeDelta timeout, - int32_t* exit_code) { -- if (!internal::DeleteChildProcessLogs()) -+ // Adapted from -+ // https://cs.chromium.org/chromium/src/sandbox/win/src/handle_inheritance_test.cc -+ base::ScopedTempDir temp_dir; -+ if (!temp_dir.CreateUniqueTempDir()) { -+ PLOG(ERROR) << "Could not create temp dir for child stdout"; -+ return false; -+ } -+ -+ base::FilePath temp_file_name; -+ if (!CreateTemporaryFileInDir(temp_dir.GetPath(), &temp_file_name)) { -+ PLOG(ERROR) << "Could not create temp file for child stdout"; -+ return false; -+ } -+ -+ SECURITY_ATTRIBUTES attrs = {}; -+ attrs.nLength = sizeof(attrs); -+ attrs.bInheritHandle = true; -+ -+ base::win::ScopedHandle child_stdout_write_handle( -+ ::CreateFile(temp_file_name.value().c_str(), GENERIC_WRITE, -+ FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, -+ &attrs, OPEN_EXISTING, 0, nullptr)); -+ if (!child_stdout_write_handle.IsValid()) { -+ PLOG(ERROR) << "Could not open child stdout file"; - return false; -+ } - -- if (!PrepareAndLaunchTestChildProcess(child_main_function)) -+ if (!PrepareAndLaunchTestChildProcess(child_main_function, -+ std::move(child_stdout_write_handle))) { -+ internal::PrintChildProcessLogs(temp_file_name); - return false; -+ } - - CreateImplOnIPCThread(std::move(mojo_pipe_)); - const bool success = base::WaitForMultiprocessTestChildExit( -@@ -189,21 +200,32 @@ bool ParentProcess::LaunchConnectedChildProcess( - } - DestroyImplOnIPCThread(); - -- if (!success || *exit_code != 0) -- internal::PrintChildProcessLogs(); -+ if (!success || *exit_code != 0) { -+ internal::PrintChildProcessLogs(temp_file_name); -+ } - - return success; - } - - bool ParentProcess::PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function) { -+ const std::string& child_main_function, -+ base::win::ScopedHandle child_stdout_write_handle) { - base::LaunchOptions launch_options; - launch_options.handles_to_inherit = extra_handles_to_inherit_; -+ launch_options.handles_to_inherit.push_back(child_stdout_write_handle.Get()); -+ launch_options.stdin_handle = INVALID_HANDLE_VALUE; -+ launch_options.stdout_handle = child_stdout_write_handle.Get(); -+ launch_options.stderr_handle = child_stdout_write_handle.Get(); -+ - CreateMojoPipe(&command_line_, &launch_options.handles_to_inherit); - - base::Process child_process = base::SpawnMultiProcessTestChild( - child_main_function, command_line_, launch_options); - -+ // Now that it's been passed to the child process, -+ // |child_stdout_write_handle| can be closed in this process as it goes out -+ // of scope. -+ - ConnectMojoPipe(std::move(child_process)); - return true; - } -@@ -235,8 +257,9 @@ SandboxedParentProcess::SandboxedParentProcess( - SandboxedParentProcess::~SandboxedParentProcess() {} - - bool SandboxedParentProcess::PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function) { -- MojoSandboxSetupHooks hooks(this); -+ const std::string& child_main_function, -+ base::win::ScopedHandle child_stdout_write_handle) { -+ MojoSandboxSetupHooks hooks(this, std::move(child_stdout_write_handle)); - - // This switch usage is copied from SpawnMultiProcessTestChild. - // -@@ -258,8 +281,7 @@ bool SandboxedParentProcess::PrepareAndLaunchTestChildProcess( - - ChildProcess::ChildProcess(scoped_refptr mojo_task_runner) - : mojo_task_runner_(mojo_task_runner), -- command_line_(base::CommandLine::ForCurrentProcess()), -- scopped_logging_(new ScopedLogging(kIPCTestUtilLogSuffix)) { -+ command_line_(base::CommandLine::ForCurrentProcess()) { - sandbox::TargetServices* target_services = - sandbox::SandboxFactory::GetTargetServices(); - if (!target_services) -diff --git a/chrome/chrome_cleaner/ipc/ipc_test_util.h b/chrome/chrome_cleaner/ipc/ipc_test_util.h -index 97f2072a09165..1b2e5598ed52a 100644 ---- a/chrome/chrome_cleaner/ipc/ipc_test_util.h -+++ b/chrome/chrome_cleaner/ipc/ipc_test_util.h -@@ -14,9 +14,9 @@ - #include "base/process/launch.h" - #include "base/process/process.h" - #include "base/time/time.h" -+#include "base/win/scoped_handle.h" - #include "chrome/chrome_cleaner/ipc/chrome_prompt_ipc.h" - #include "chrome/chrome_cleaner/ipc/mojo_task_runner.h" --#include "chrome/chrome_cleaner/logging/scoped_logging.h" - #include "mojo/public/cpp/platform/platform_channel.h" - #include "mojo/public/cpp/system/invitation.h" - #include "mojo/public/cpp/system/message_pipe.h" -@@ -70,7 +70,8 @@ class ParentProcess : public base::RefCountedThreadSafe { - // as in the sandbox. Subclasses should call CreateMojoPipe before the - // subprocess is spawned and ConnectMojoPipe afterward. - virtual bool PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function); -+ const std::string& child_main_function, -+ base::win::ScopedHandle child_stdout_write_handle); - - scoped_refptr mojo_task_runner(); - -@@ -95,7 +96,8 @@ class SandboxedParentProcess : public ParentProcess { - ~SandboxedParentProcess() override; - - bool PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function) override; -+ const std::string& child_main_function, -+ base::win::ScopedHandle child_stdout_write_handle) override; - }; - - class ChildProcess : public base::RefCountedThreadSafe { -@@ -120,7 +122,6 @@ class ChildProcess : public base::RefCountedThreadSafe { - - private: - base::CommandLine* command_line_; -- std::unique_ptr scopped_logging_; - - // This will be true iff the process is running in a sandbox and - // TargetServices was initialized successfully. -@@ -143,9 +144,7 @@ class ChromePromptIPCTestErrorHandler : public ChromePromptIPC::ErrorHandler { - }; - - namespace internal { --base::FilePath::StringPieceType GetLogPathSuffix(); --bool DeleteChildProcessLogs(); --void PrintChildProcessLogs(); -+void PrintChildProcessLogs(const base::FilePath& log_file); - } // namespace internal - - } // namespace chrome_cleaner -diff --git a/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc b/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc -index 1c7b4c575eb3d..f867df58f96ea 100644 ---- a/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc -+++ b/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc -@@ -5,6 +5,7 @@ - #include - - #include "base/command_line.h" -+#include "base/files/file_util.h" - #include "base/process/process.h" - #include "base/strings/strcat.h" - #include "base/strings/string_number_conversions.h" -@@ -41,8 +42,9 @@ constexpr char kExpectedPromptResultSwitch[] = "expected-prompt-result"; - constexpr char kExpectedChromeDisconnectPointSwitch[] = - "expected-parent-disconnected"; - --const base::char16 kInvalidUTF16String[] = {0xDC00, 0xD800, 0xD800, 0xDFFF, -- 0xDFFF, 0xDBFF, 0}; -+constexpr base::char16 kLogSuffix[] = L"prompt-ipc-test"; -+constexpr base::char16 kInvalidUTF16String[] = {0xDC00, 0xD800, 0xD800, 0xDFFF, -+ 0xDFFF, 0xDBFF, 0}; - const base::FilePath kInvalidFilePath(kInvalidUTF16String); - const base::FilePath kNonASCIIFilePath(L"ééààçç"); - const base::string16 kInvalidRegistryKey(kInvalidUTF16String); -@@ -420,8 +422,7 @@ class MockChrome { - class ChildProcess { - public: - ChildProcess() -- : scopped_logging_( -- std::make_unique(internal::GetLogPathSuffix())) { -+ : scopped_logging_(std::make_unique(kLogSuffix)) { - mock_chrome_ = std::make_unique( - ExtractHandleFromCommandLine(chrome_cleaner::kChromeReadHandleSwitch), - ExtractHandleFromCommandLine(chrome_cleaner::kChromeWriteHandleSwitch)); -@@ -630,7 +631,10 @@ class ParentProcess { - } - - void Run() { -- ASSERT_TRUE(internal::DeleteChildProcessLogs()); -+ // Delete the child process log file if existing. -+ const base::FilePath log_path = ScopedLogging::GetLogFilePath(kLogSuffix); -+ ASSERT_TRUE(base::DeleteFile(log_path, false)) -+ << "Can't delete log file from previous run: " << log_path.value(); - - // Pass the command to the child process and launch the child process. - base::Process child_process = base::SpawnMultiProcessTestChild( -@@ -702,7 +706,8 @@ class ParentProcess { - EXPECT_EQ(expected_exit_code, rv); - - if (!success || rv != 0) { -- internal::PrintChildProcessLogs(); -+ internal::PrintChildProcessLogs( -+ ScopedLogging::GetLogFilePath(kLogSuffix)); - } - } - -diff --git a/chrome/chrome_cleaner/ipc/sandbox.cc b/chrome/chrome_cleaner/ipc/sandbox.cc -index 154bd05c51066..fafad4f0c6188 100644 ---- a/chrome/chrome_cleaner/ipc/sandbox.cc -+++ b/chrome/chrome_cleaner/ipc/sandbox.cc -@@ -280,8 +280,9 @@ ResultCode StartSandboxTarget(const base::CommandLine& sandbox_command_line, - &last_win_error, &temp_process_info); - if (sandbox_result != sandbox::SBOX_ALL_OK) { - LOG(DFATAL) << "Failed to spawn sandbox target: " << sandbox_result -- << " , last sandbox warning : " << last_sbox_warning -- << " , last windows error: " << last_win_error; -+ << ", last sandbox warning: " << last_sbox_warning -+ << ", last windows error: " -+ << logging::SystemErrorCodeToString(last_win_error); - return RESULT_CODE_FAILED_TO_START_SANDBOX_PROCESS; - } - diff --git a/srcpkgs/electron7/files/patches/chromium-003-upstream_move_child_process_log.patch.patch b/srcpkgs/electron7/files/patches/chromium-003-upstream_move_child_process_log.patch.patch deleted file mode 100644 index 518b955a0b0..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-003-upstream_move_child_process_log.patch.patch +++ /dev/null @@ -1,730 +0,0 @@ -From 726cbfcfaa521e9e5098829195a7d9a9c19ca391 Mon Sep 17 00:00:00 2001 -From: Joe Mason -Date: Wed, 4 Dec 2019 18:15:36 +0000 -Subject: [PATCH] Move child process log capture to a ChildProcessLogger class. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Update comments to clarify how the child process log interacts with -ScopedLogging. - -Use the new class to capture logs in cleaner_test.cc, -secure_dll_loading_test.cc and proto_chrome_prompt_ipc_unittest.cc. - -R=​proberge - -(cherry picked from commit 063600229fb7dc472ff66839ba2657bf99b98850) - -Bug: 1030333 -Change-Id: I88f538ff360bb8ed9da6743dc5d6c4b263af992c -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947986 -Commit-Queue: Joe Mason -Reviewed-by: proberge -Cr-Original-Commit-Position: refs/heads/master@{#721184} -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949631 -Reviewed-by: Joe Mason -Cr-Commit-Position: refs/branch-heads/3904@{#914} -Cr-Branched-From: 675968a8c657a3bd9c1c2c20c5d2935577bbc5e6-refs/heads/master@{#693954} ---- - chrome/chrome_cleaner/ipc/BUILD.gn | 1 + - chrome/chrome_cleaner/ipc/ipc_test_util.cc | 98 +++---------------- - chrome/chrome_cleaner/ipc/ipc_test_util.h | 17 ++-- - .../ipc/proto_chrome_prompt_ipc_unittest.cc | 26 +++-- - chrome/chrome_cleaner/test/BUILD.gn | 3 + - .../test/child_process_logger.cc | 90 +++++++++++++++++ - .../test/child_process_logger.h | 62 ++++++++++++ - chrome/chrome_cleaner/test/cleaner_test.cc | 14 ++- - .../test/secure_dll_loading_test.cc | 57 ++--------- - 9 files changed, 207 insertions(+), 161 deletions(-) - create mode 100644 chrome/chrome_cleaner/test/child_process_logger.cc - create mode 100644 chrome/chrome_cleaner/test/child_process_logger.h - -diff --git a/chrome/chrome_cleaner/ipc/BUILD.gn b/chrome/chrome_cleaner/ipc/BUILD.gn -index 03fddfd8736e1..4d81803a24df6 100644 ---- a/chrome/chrome_cleaner/ipc/BUILD.gn -+++ b/chrome/chrome_cleaner/ipc/BUILD.gn -@@ -77,6 +77,7 @@ source_set("ipc_test_util") { - "//base/test:test_support", - "//chrome/chrome_cleaner/ipc:sandbox", - "//chrome/chrome_cleaner/logging:common", -+ "//chrome/chrome_cleaner/test:test_util", - "//mojo/public/cpp/system", - "//sandbox/win:sandbox", - "//testing/gtest", -diff --git a/chrome/chrome_cleaner/ipc/ipc_test_util.cc b/chrome/chrome_cleaner/ipc/ipc_test_util.cc -index 0d03a6870fb07..ea2bb2145bfdd 100644 ---- a/chrome/chrome_cleaner/ipc/ipc_test_util.cc -+++ b/chrome/chrome_cleaner/ipc/ipc_test_util.cc -@@ -12,14 +12,10 @@ - #include "base/bind_helpers.h" - #include "base/command_line.h" - #include "base/files/file_path.h" --#include "base/files/file_util.h" --#include "base/files/scoped_temp_dir.h" - #include "base/logging.h" - #include "base/process/launch.h" - #include "base/rand_util.h" - #include "base/strings/string_number_conversions.h" --#include "base/strings/string_piece.h" --#include "base/strings/string_split.h" - #include "base/test/multiprocess_test.h" - #include "base/test/test_timeouts.h" - #include "base/win/win_util.h" -@@ -34,11 +30,8 @@ constexpr char kMojoPipeTokenSwitch[] = "mojo-pipe-token"; - - class MojoSandboxSetupHooks : public SandboxSetupHooks { - public: -- explicit MojoSandboxSetupHooks( -- SandboxedParentProcess* parent_process, -- base::win::ScopedHandle child_stdout_write_handle) -- : parent_process_(parent_process), -- child_stdout_write_handle_(std::move(child_stdout_write_handle)) {} -+ explicit MojoSandboxSetupHooks(SandboxedParentProcess* parent_process) -+ : parent_process_(parent_process) {} - ~MojoSandboxSetupHooks() override = default; - - // SandboxSetupHooks -@@ -50,8 +43,7 @@ class MojoSandboxSetupHooks : public SandboxSetupHooks { - parent_process_->CreateMojoPipe(command_line, &handles_to_inherit); - for (HANDLE handle : handles_to_inherit) - policy->AddHandleToShare(handle); -- policy->SetStdoutHandle(child_stdout_write_handle_.Get()); -- policy->SetStderrHandle(child_stdout_write_handle_.Get()); -+ parent_process_->child_process_logger().UpdateSandboxPolicy(policy); - return RESULT_CODE_SUCCESS; - } - -@@ -69,38 +61,6 @@ class MojoSandboxSetupHooks : public SandboxSetupHooks { - - } // namespace - --namespace internal { -- --void PrintChildProcessLogs(const base::FilePath& log_path) { -- if (log_path.empty()) { -- LOG(ERROR) << "Child process log path is empty"; -- return; -- } -- -- if (!base::PathExists(log_path)) { -- LOG(ERROR) << "Child process log file doesn't exist"; -- return; -- } -- -- // Collect the child process log file, and dump the contents, to help -- // debugging failures. -- std::string log_file_contents; -- if (!base::ReadFileToString(log_path, &log_file_contents)) { -- LOG(ERROR) << "Failed to read child process log file"; -- return; -- } -- -- std::vector lines = -- base::SplitStringPiece(log_file_contents, "\n", base::TRIM_WHITESPACE, -- base::SPLIT_WANT_NONEMPTY); -- LOG(ERROR) << "Dumping child process logs"; -- for (const auto& line : lines) { -- LOG(ERROR) << "Child process: " << line; -- } --} -- --} // namespace internal -- - ParentProcess::ParentProcess(scoped_refptr mojo_task_runner) - : command_line_(base::GetMultiProcessTestChildBaseCommandLine()), - mojo_task_runner_(mojo_task_runner) {} -@@ -158,36 +118,10 @@ bool ParentProcess::LaunchConnectedChildProcess( - const std::string& child_main_function, - base::TimeDelta timeout, - int32_t* exit_code) { -- // Adapted from -- // https://cs.chromium.org/chromium/src/sandbox/win/src/handle_inheritance_test.cc -- base::ScopedTempDir temp_dir; -- if (!temp_dir.CreateUniqueTempDir()) { -- PLOG(ERROR) << "Could not create temp dir for child stdout"; -+ if (!child_process_logger_.Initialize()) - return false; -- } -- -- base::FilePath temp_file_name; -- if (!CreateTemporaryFileInDir(temp_dir.GetPath(), &temp_file_name)) { -- PLOG(ERROR) << "Could not create temp file for child stdout"; -- return false; -- } -- -- SECURITY_ATTRIBUTES attrs = {}; -- attrs.nLength = sizeof(attrs); -- attrs.bInheritHandle = true; -- -- base::win::ScopedHandle child_stdout_write_handle( -- ::CreateFile(temp_file_name.value().c_str(), GENERIC_WRITE, -- FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, -- &attrs, OPEN_EXISTING, 0, nullptr)); -- if (!child_stdout_write_handle.IsValid()) { -- PLOG(ERROR) << "Could not open child stdout file"; -- return false; -- } -- -- if (!PrepareAndLaunchTestChildProcess(child_main_function, -- std::move(child_stdout_write_handle))) { -- internal::PrintChildProcessLogs(temp_file_name); -+ if (!PrepareAndLaunchTestChildProcess(child_main_function)) { -+ child_process_logger_.DumpLogs(); - return false; - } - -@@ -201,31 +135,22 @@ bool ParentProcess::LaunchConnectedChildProcess( - DestroyImplOnIPCThread(); - - if (!success || *exit_code != 0) { -- internal::PrintChildProcessLogs(temp_file_name); -+ child_process_logger_.DumpLogs(); - } - - return success; - } - - bool ParentProcess::PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function, -- base::win::ScopedHandle child_stdout_write_handle) { -+ const std::string& child_main_function) { - base::LaunchOptions launch_options; - launch_options.handles_to_inherit = extra_handles_to_inherit_; -- launch_options.handles_to_inherit.push_back(child_stdout_write_handle.Get()); -- launch_options.stdin_handle = INVALID_HANDLE_VALUE; -- launch_options.stdout_handle = child_stdout_write_handle.Get(); -- launch_options.stderr_handle = child_stdout_write_handle.Get(); -- -+ child_process_logger_.UpdateLaunchOptions(&launch_options); - CreateMojoPipe(&command_line_, &launch_options.handles_to_inherit); - - base::Process child_process = base::SpawnMultiProcessTestChild( - child_main_function, command_line_, launch_options); - -- // Now that it's been passed to the child process, -- // |child_stdout_write_handle| can be closed in this process as it goes out -- // of scope. -- - ConnectMojoPipe(std::move(child_process)); - return true; - } -@@ -257,9 +182,8 @@ SandboxedParentProcess::SandboxedParentProcess( - SandboxedParentProcess::~SandboxedParentProcess() {} - - bool SandboxedParentProcess::PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function, -- base::win::ScopedHandle child_stdout_write_handle) { -- MojoSandboxSetupHooks hooks(this, std::move(child_stdout_write_handle)); -+ const std::string& child_main_function) { -+ MojoSandboxSetupHooks hooks(this); - - // This switch usage is copied from SpawnMultiProcessTestChild. - // -diff --git a/chrome/chrome_cleaner/ipc/ipc_test_util.h b/chrome/chrome_cleaner/ipc/ipc_test_util.h -index 1b2e5598ed52a..1526a42701353 100644 ---- a/chrome/chrome_cleaner/ipc/ipc_test_util.h -+++ b/chrome/chrome_cleaner/ipc/ipc_test_util.h -@@ -14,9 +14,9 @@ - #include "base/process/launch.h" - #include "base/process/process.h" - #include "base/time/time.h" --#include "base/win/scoped_handle.h" - #include "chrome/chrome_cleaner/ipc/chrome_prompt_ipc.h" - #include "chrome/chrome_cleaner/ipc/mojo_task_runner.h" -+#include "chrome/chrome_cleaner/test/child_process_logger.h" - #include "mojo/public/cpp/platform/platform_channel.h" - #include "mojo/public/cpp/system/invitation.h" - #include "mojo/public/cpp/system/message_pipe.h" -@@ -58,6 +58,10 @@ class ParentProcess : public base::RefCountedThreadSafe { - return extra_handles_to_inherit_; - } - -+ const ChildProcessLogger& child_process_logger() const { -+ return child_process_logger_; -+ } -+ - protected: - friend base::RefCountedThreadSafe; - virtual ~ParentProcess(); -@@ -70,13 +74,13 @@ class ParentProcess : public base::RefCountedThreadSafe { - // as in the sandbox. Subclasses should call CreateMojoPipe before the - // subprocess is spawned and ConnectMojoPipe afterward. - virtual bool PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function, -- base::win::ScopedHandle child_stdout_write_handle); -+ const std::string& child_main_function); - - scoped_refptr mojo_task_runner(); - - base::CommandLine command_line_; - base::HandlesToInheritVector extra_handles_to_inherit_; -+ ChildProcessLogger child_process_logger_; - - private: - scoped_refptr mojo_task_runner_; -@@ -96,8 +100,7 @@ class SandboxedParentProcess : public ParentProcess { - ~SandboxedParentProcess() override; - - bool PrepareAndLaunchTestChildProcess( -- const std::string& child_main_function, -- base::win::ScopedHandle child_stdout_write_handle) override; -+ const std::string& child_main_function) override; - }; - - class ChildProcess : public base::RefCountedThreadSafe { -@@ -143,10 +146,6 @@ class ChromePromptIPCTestErrorHandler : public ChromePromptIPC::ErrorHandler { - base::OnceClosure on_closed_after_done_; - }; - --namespace internal { --void PrintChildProcessLogs(const base::FilePath& log_file); --} // namespace internal -- - } // namespace chrome_cleaner - - #endif // CHROME_CHROME_CLEANER_IPC_IPC_TEST_UTIL_H_ -diff --git a/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc b/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc -index f867df58f96ea..e3ce2ab6c27fe 100644 ---- a/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc -+++ b/chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc_unittest.cc -@@ -5,7 +5,6 @@ - #include - - #include "base/command_line.h" --#include "base/files/file_util.h" - #include "base/process/process.h" - #include "base/strings/strcat.h" - #include "base/strings/string_number_conversions.h" -@@ -19,7 +18,7 @@ - #include "base/win/win_util.h" - #include "chrome/chrome_cleaner/ipc/ipc_test_util.h" - #include "chrome/chrome_cleaner/ipc/proto_chrome_prompt_ipc.h" --#include "chrome/chrome_cleaner/logging/scoped_logging.h" -+#include "chrome/chrome_cleaner/test/child_process_logger.h" - #include "components/chrome_cleaner/public/constants/constants.h" - #include "components/chrome_cleaner/public/proto/chrome_prompt.pb.h" - #include "components/chrome_cleaner/public/proto/chrome_prompt_for_tests.pb.h" -@@ -42,7 +41,6 @@ constexpr char kExpectedPromptResultSwitch[] = "expected-prompt-result"; - constexpr char kExpectedChromeDisconnectPointSwitch[] = - "expected-parent-disconnected"; - --constexpr base::char16 kLogSuffix[] = L"prompt-ipc-test"; - constexpr base::char16 kInvalidUTF16String[] = {0xDC00, 0xD800, 0xD800, 0xDFFF, - 0xDFFF, 0xDBFF, 0}; - const base::FilePath kInvalidFilePath(kInvalidUTF16String); -@@ -421,8 +419,7 @@ class MockChrome { - // Gtest to log. - class ChildProcess { - public: -- ChildProcess() -- : scopped_logging_(std::make_unique(kLogSuffix)) { -+ ChildProcess() { - mock_chrome_ = std::make_unique( - ExtractHandleFromCommandLine(chrome_cleaner::kChromeReadHandleSwitch), - ExtractHandleFromCommandLine(chrome_cleaner::kChromeWriteHandleSwitch)); -@@ -571,7 +568,6 @@ class ChildProcess { - - private: - std::unique_ptr mock_chrome_; -- std::unique_ptr scopped_logging_; - - ChromeDisconnectPoint expected_disconnect_point_ = - ChromeDisconnectPoint::kUnspecified; -@@ -603,6 +599,9 @@ class ProtoChromePromptIPCTest - class ParentProcess { - public: - bool Initialize() { -+ if (!child_process_logger_.Initialize()) -+ return false; -+ - // Inject the flags related to the the config in the command line. - test_config_.EnhanceCommandLine(&command_line_); - -@@ -631,14 +630,13 @@ class ParentProcess { - } - - void Run() { -- // Delete the child process log file if existing. -- const base::FilePath log_path = ScopedLogging::GetLogFilePath(kLogSuffix); -- ASSERT_TRUE(base::DeleteFile(log_path, false)) -- << "Can't delete log file from previous run: " << log_path.value(); -+ child_process_logger_.UpdateLaunchOptions(&launch_options_); - - // Pass the command to the child process and launch the child process. - base::Process child_process = base::SpawnMultiProcessTestChild( - "ProtoChromePromptIPCClientMain", command_line_, launch_options_); -+ if (!child_process.IsRunning()) -+ child_process_logger_.DumpLogs(); - ASSERT_TRUE(child_process.IsRunning()); - - // Close our references to the handles as they are now handled by the child -@@ -705,10 +703,8 @@ class ParentProcess { - - EXPECT_EQ(expected_exit_code, rv); - -- if (!success || rv != 0) { -- internal::PrintChildProcessLogs( -- ScopedLogging::GetLogFilePath(kLogSuffix)); -- } -+ if (!success || rv != 0) -+ child_process_logger_.DumpLogs(); - } - - TestConfig& GetTestConfig() { return test_config_; } -@@ -732,6 +728,8 @@ class ParentProcess { - // Blocks until we receive the response from Chrome or an error occurs. - base::RunLoop main_runloop_; - bool error_occurred_ = false; -+ -+ ChildProcessLogger child_process_logger_; - }; - - // This contains calls to the chrome_cleaner_ipc implementation. -diff --git a/chrome/chrome_cleaner/test/BUILD.gn b/chrome/chrome_cleaner/test/BUILD.gn -index 118454c2bdcd2..4b053fdcaf182 100644 ---- a/chrome/chrome_cleaner/test/BUILD.gn -+++ b/chrome/chrome_cleaner/test/BUILD.gn -@@ -148,6 +148,8 @@ source_set("test_util") { - testonly = true - - sources = [ -+ "child_process_logger.cc", -+ "child_process_logger.h", - "file_remover_test_util.cc", - "file_remover_test_util.h", - "reboot_deletion_helper.cc", -@@ -228,6 +230,7 @@ source_set("integration_test_sources") { - "//chrome/chrome_cleaner/os:common_os", - "//chrome/chrome_cleaner/pup_data:pup_data_base", - "//chrome/chrome_cleaner/pup_data:test_uws", -+ "//chrome/chrome_cleaner/test:test_util", - "//chrome/chrome_cleaner/zip_archiver:common", - "//components/chrome_cleaner/public/constants", - "//components/chrome_cleaner/test:test_name_helper", -diff --git a/chrome/chrome_cleaner/test/child_process_logger.cc b/chrome/chrome_cleaner/test/child_process_logger.cc -new file mode 100644 -index 0000000000000..9f4836267aea6 ---- /dev/null -+++ b/chrome/chrome_cleaner/test/child_process_logger.cc -@@ -0,0 +1,90 @@ -+// Copyright 2019 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. -+ -+#include "chrome/chrome_cleaner/test/child_process_logger.h" -+ -+#include -+ -+#include "base/files/file_util.h" -+#include "base/logging.h" -+#include "base/strings/string_piece.h" -+#include "base/strings/string_split.h" -+ -+namespace chrome_cleaner { -+ -+ChildProcessLogger::ChildProcessLogger() = default; -+ -+ChildProcessLogger::~ChildProcessLogger() = default; -+ -+bool ChildProcessLogger::Initialize() { -+ // Adapted from -+ // https://cs.chromium.org/chromium/src/sandbox/win/src/handle_inheritance_test.cc -+ if (!temp_dir_.CreateUniqueTempDir()) { -+ PLOG(ERROR) << "Could not create temp dir for child stdout"; -+ return false; -+ } -+ -+ if (!CreateTemporaryFileInDir(temp_dir_.GetPath(), &temp_file_name_)) { -+ PLOG(ERROR) << "Could not create temp file for child stdout"; -+ return false; -+ } -+ -+ SECURITY_ATTRIBUTES attrs = {}; -+ attrs.nLength = sizeof(attrs); -+ attrs.bInheritHandle = true; -+ -+ child_stdout_handle_.Set( -+ ::CreateFile(temp_file_name_.value().c_str(), GENERIC_WRITE, -+ FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, -+ &attrs, OPEN_EXISTING, 0, nullptr)); -+ if (!child_stdout_handle_.IsValid()) { -+ PLOG(ERROR) << "Could not open child stdout file"; -+ return false; -+ } -+ -+ return true; -+} -+ -+void ChildProcessLogger::UpdateLaunchOptions( -+ base::LaunchOptions* options) const { -+ DCHECK(child_stdout_handle_.IsValid()); -+ options->handles_to_inherit.push_back(child_stdout_handle_.Get()); -+ options->stdin_handle = INVALID_HANDLE_VALUE; -+ options->stdout_handle = child_stdout_handle_.Get(); -+ options->stderr_handle = child_stdout_handle_.Get(); -+} -+ -+void ChildProcessLogger::UpdateSandboxPolicy( -+ sandbox::TargetPolicy* policy) const { -+ DCHECK(child_stdout_handle_.IsValid()); -+ policy->SetStdoutHandle(child_stdout_handle_.Get()); -+ policy->SetStderrHandle(child_stdout_handle_.Get()); -+} -+ -+void ChildProcessLogger::DumpLogs() const { -+ DCHECK(!temp_file_name_.empty()); -+ -+ if (!base::PathExists(temp_file_name_)) { -+ LOG(ERROR) << "Child process log file doesn't exist"; -+ return; -+ } -+ -+ // Collect the child process log file, and dump the contents, to help -+ // debugging failures. -+ std::string log_file_contents; -+ if (!base::ReadFileToString(temp_file_name_, &log_file_contents)) { -+ LOG(ERROR) << "Failed to read child process log file"; -+ return; -+ } -+ -+ std::vector lines = -+ base::SplitStringPiece(log_file_contents, "\n", base::TRIM_WHITESPACE, -+ base::SPLIT_WANT_NONEMPTY); -+ LOG(ERROR) << "Dumping child process logs"; -+ for (const auto& line : lines) { -+ LOG(ERROR) << "Child process: " << line; -+ } -+} -+ -+} // namespace chrome_cleaner -diff --git a/chrome/chrome_cleaner/test/child_process_logger.h b/chrome/chrome_cleaner/test/child_process_logger.h -new file mode 100644 -index 0000000000000..215fa911d7899 ---- /dev/null -+++ b/chrome/chrome_cleaner/test/child_process_logger.h -@@ -0,0 +1,62 @@ -+// Copyright 2019 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. -+ -+#ifndef CHROME_CHROME_CLEANER_TEST_CHILD_PROCESS_LOGGER_H_ -+#define CHROME_CHROME_CLEANER_TEST_CHILD_PROCESS_LOGGER_H_ -+ -+#include "base/files/scoped_temp_dir.h" -+#include "base/process/launch.h" -+#include "base/win/scoped_handle.h" -+#include "sandbox/win/src/sandbox_policy.h" -+ -+namespace chrome_cleaner { -+ -+// Redirects stdin and stdout of a child process to a temp file. Tests that -+// spawn children can add the contents of the temp file to the test output. -+// -+// Note that if the child process sets up ScopedLogging, ERROR and FATAL level -+// logs will still be captured by this, but other logs will start going to the -+// ScopedLogging log file. test_main.cc sets up ScopedLogging so usually this -+// class will capture: -+// -+// 1. All log lines from before the ScopedLogging constructor. -+// 2. ERROR and FATAL log lines from after that. -+// 3. stdout and stderr output that doesn't go through the logging system. -+// 4. Stack traces from any crashes. -+// -+// This should be all that's needed to diagnose errors in tests. -+class ChildProcessLogger { -+ public: -+ ChildProcessLogger(); -+ ~ChildProcessLogger(); -+ -+ // Creates a temp file for child processes to log to. Logs an error and -+ // returns false on failure. -+ bool Initialize(); -+ -+ // Updates |options| to direct the child stdout and stderr to the temp file. -+ // For use with base::LaunchProcess and base::SpawnMultiProcessTestChild. -+ void UpdateLaunchOptions(base::LaunchOptions* options) const; -+ -+ // Updates |policy| to direct the child stdout and stderr to the temp file. -+ // For use with sandbox::BrokerServices::SpawnTarget. -+ void UpdateSandboxPolicy(sandbox::TargetPolicy* policy) const; -+ -+ // Writes every line in the temp file using LOG(ERROR) so that all lines are -+ // captured in the test suite output. The class-level comment above describes -+ // which log lines from the child will be captured. -+ void DumpLogs() const; -+ -+ private: -+ ChildProcessLogger(const ChildProcessLogger& other) = delete; -+ ChildProcessLogger& operator=(const ChildProcessLogger& other) = delete; -+ -+ base::ScopedTempDir temp_dir_; -+ base::FilePath temp_file_name_; -+ base::win::ScopedHandle child_stdout_handle_; -+}; -+ -+} // namespace chrome_cleaner -+ -+#endif // CHROME_CHROME_CLEANER_TEST_CHILD_PROCESS_LOGGER_H_ -diff --git a/chrome/chrome_cleaner/test/cleaner_test.cc b/chrome/chrome_cleaner/test/cleaner_test.cc -index d6df17e3516f1..f778103bfdad3 100644 ---- a/chrome/chrome_cleaner/test/cleaner_test.cc -+++ b/chrome/chrome_cleaner/test/cleaner_test.cc -@@ -24,6 +24,7 @@ - #include "chrome/chrome_cleaner/os/pre_fetched_paths.h" - #include "chrome/chrome_cleaner/pup_data/pup_data.h" - #include "chrome/chrome_cleaner/pup_data/test_uws.h" -+#include "chrome/chrome_cleaner/test/child_process_logger.h" - #include "chrome/chrome_cleaner/test/test_util.h" - #include "chrome/chrome_cleaner/zip_archiver/sandboxed_zip_archiver.h" - #include "components/chrome_cleaner/public/constants/constants.h" -@@ -311,8 +312,14 @@ class CleanerTest - - void ExpectExitCode(const base::CommandLine& command_line, - int expected_exit_code) { -- base::Process process( -- base::LaunchProcess(command_line, base::LaunchOptions())); -+ chrome_cleaner::ChildProcessLogger logger; -+ ASSERT_TRUE(logger.Initialize()); -+ -+ base::LaunchOptions options; -+ logger.UpdateLaunchOptions(&options); -+ base::Process process(base::LaunchProcess(command_line, options)); -+ if (!process.IsValid()) -+ logger.DumpLogs(); - ASSERT_TRUE(process.IsValid()); - - int exit_code = -1; -@@ -320,7 +327,8 @@ class CleanerTest - base::TimeDelta::FromMinutes(10), &exit_code); - EXPECT_TRUE(exited_within_timeout); - EXPECT_EQ(expected_exit_code, exit_code); -- -+ if (!exited_within_timeout || expected_exit_code != exit_code) -+ logger.DumpLogs(); - if (!exited_within_timeout) - process.Terminate(/*exit_code=*/-1, /*wait=*/false); - } -diff --git a/chrome/chrome_cleaner/test/secure_dll_loading_test.cc b/chrome/chrome_cleaner/test/secure_dll_loading_test.cc -index fe10c44346b5e..92e2db19fde6c 100644 ---- a/chrome/chrome_cleaner/test/secure_dll_loading_test.cc -+++ b/chrome/chrome_cleaner/test/secure_dll_loading_test.cc -@@ -8,22 +8,17 @@ - - #include - #include --#include - #include - - #include "base/base_paths.h" - #include "base/command_line.h" - #include "base/files/file_path.h" --#include "base/files/file_util.h" --#include "base/files/scoped_temp_dir.h" - #include "base/logging.h" - #include "base/path_service.h" - #include "base/process/launch.h" - #include "base/process/process.h" - #include "base/strings/string16.h" - #include "base/strings/string_number_conversions.h" --#include "base/strings/string_piece.h" --#include "base/strings/string_split.h" - #include "base/strings/string_util.h" - #include "base/synchronization/waitable_event.h" - #include "base/test/test_timeouts.h" -@@ -32,54 +27,16 @@ - #include "chrome/chrome_cleaner/constants/chrome_cleaner_switches.h" - #include "chrome/chrome_cleaner/os/inheritable_event.h" - #include "chrome/chrome_cleaner/os/process.h" -+#include "chrome/chrome_cleaner/test/child_process_logger.h" - #include "chrome/chrome_cleaner/test/test_util.h" - #include "components/chrome_cleaner/public/constants/constants.h" - #include "components/chrome_cleaner/test/test_name_helper.h" - #include "testing/gtest/include/gtest/gtest.h" - --namespace { -- --void PrintChildProcessLogs(const base::FilePath& log_dir, -- base::StringPiece16 file_name) { -- base::string16 base_name; -- if (file_name == L"software_reporter_tool") { -- base_name = L"software_reporter_tool"; -- } else if (file_name == L"chrome_cleanup_tool") { -- base_name = L"chrome_cleanup"; -- } else { -- LOG(ERROR) << "Unknown file name " << file_name.data(); -- return; -- } -- -- base::FilePath log_path = log_dir.Append(base_name).AddExtension(L"log"); -- -- if (!base::PathExists(log_path)) { -- LOG(ERROR) << "Child process log file doesn't exist"; -- return; -- } -- -- // Collect the child process log file, and dump the contents, to help -- // debugging failures. -- std::string log_file_contents; -- if (!base::ReadFileToString(log_path, &log_file_contents)) { -- LOG(ERROR) << "Failed to read child process log file"; -- return; -- } -- -- std::vector lines = -- base::SplitStringPiece(log_file_contents, "\n", base::TRIM_WHITESPACE, -- base::SPLIT_WANT_NONEMPTY); -- LOG(ERROR) << "Dumping child process logs"; -- for (const auto& line : lines) { -- LOG(ERROR) << "Child process: " << line; -- } --} -- --} // namespace -- - class SecureDLLLoadingTest : public testing::TestWithParam { - protected: - void SetUp() override { -+ ASSERT_TRUE(child_process_logger_.Initialize()); - base::FilePath out_dir; - ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &out_dir)); - exe_path_ = out_dir.Append(GetParam() + L".exe"); -@@ -104,8 +61,6 @@ class SecureDLLLoadingTest : public testing::TestWithParam { - base::NumberToString16( - base::win::HandleToUint32(init_done_notifier->handle()))); - command_line.AppendSwitch(chrome_cleaner::kLoadEmptyDLLSwitch); -- command_line.AppendSwitchPath(chrome_cleaner::kTestLoggingPathSwitch, -- log_dir.GetPath()); - - #if !BUILDFLAG(IS_OFFICIAL_CHROME_CLEANER_BUILD) - if (disable_secure_dll_loading) -@@ -121,7 +76,12 @@ class SecureDLLLoadingTest : public testing::TestWithParam { - - base::LaunchOptions options; - options.handles_to_inherit.push_back(init_done_notifier->handle()); -+ child_process_logger_.UpdateLaunchOptions(&options); - base::Process process = base::LaunchProcess(command_line, options); -+ if (!process.IsValid()) { -+ child_process_logger_.DumpLogs(); -+ return process; -+ } - - // Make sure the process has finished its initialization (including loading - // DLLs). Also check the process handle in case it exits with an error. -@@ -136,7 +96,7 @@ class SecureDLLLoadingTest : public testing::TestWithParam { - PLOG_IF(ERROR, !::GetExitCodeProcess(process.Handle(), &exit_code)); - ADD_FAILURE() << "Process exited with " << exit_code - << " before signalling init_done_notifier"; -- PrintChildProcessLogs(log_dir.GetPath(), GetParam()); -+ child_process_logger_.DumpLogs(); - } else { - EXPECT_EQ(wait_result, WAIT_OBJECT_0); - } -@@ -157,6 +117,7 @@ class SecureDLLLoadingTest : public testing::TestWithParam { - } - - private: -+ chrome_cleaner::ChildProcessLogger child_process_logger_; - base::FilePath exe_path_; - base::FilePath empty_dll_path_; - }; diff --git a/srcpkgs/electron7/files/patches/chromium-004-upstream_use_childprocesslogger.patch.patch b/srcpkgs/electron7/files/patches/chromium-004-upstream_use_childprocesslogger.patch.patch deleted file mode 100644 index 6a2a4893d44..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-004-upstream_use_childprocesslogger.patch.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 890956be1496b625967df0bbf620e8fc4aefb390 Mon Sep 17 00:00:00 2001 -From: Joe Mason -Date: Wed, 4 Dec 2019 18:22:34 +0000 -Subject: [PATCH] Use ChildProcessLogger in FileRemoverQuarantineTest and - SandboxedShortcutParserTest -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -R=​proberge - -(cherry picked from commit 814583834ebf35ede5dad0ba3574343851b1a8bd) - -Bug: 1030333 -Change-Id: I66b9b3dc73980e8ed03ee37d89eb172b5330c913 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948235 -Commit-Queue: Joe Mason -Reviewed-by: proberge -Cr-Original-Commit-Position: refs/heads/master@{#721193} -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948102 -Reviewed-by: Joe Mason -Cr-Commit-Position: refs/branch-heads/3904@{#915} -Cr-Branched-From: 675968a8c657a3bd9c1c2c20c5d2935577bbc5e6-refs/heads/master@{#693954} ---- - .../os/file_remover_unittest.cc | 39 ++++++++++++++++--- - .../parsers/shortcut_parser/broker/BUILD.gn | 1 + - .../sandboxed_shortcut_parser_unittest.cc | 35 +++++++++++++++-- - 3 files changed, 67 insertions(+), 8 deletions(-) - -diff --git a/chrome/chrome_cleaner/os/file_remover_unittest.cc b/chrome/chrome_cleaner/os/file_remover_unittest.cc -index 52c9b4f1c5089..c57983e83c6b9 100644 ---- a/chrome/chrome_cleaner/os/file_remover_unittest.cc -+++ b/chrome/chrome_cleaner/os/file_remover_unittest.cc -@@ -30,6 +30,7 @@ - #include "chrome/chrome_cleaner/os/pre_fetched_paths.h" - #include "chrome/chrome_cleaner/os/system_util.h" - #include "chrome/chrome_cleaner/os/whitelisted_directory.h" -+#include "chrome/chrome_cleaner/test/child_process_logger.h" - #include "chrome/chrome_cleaner/test/file_remover_test_util.h" - #include "chrome/chrome_cleaner/test/reboot_deletion_helper.h" - #include "chrome/chrome_cleaner/test/resources/grit/test_resources.h" -@@ -398,20 +399,47 @@ constexpr wchar_t kTestExpectArchiveName[] = - L"temp_file.exe_" - L"A591A6D40BF420404A011733CFB7B190D62C65BF0BCDA32B57B277D9AD9F146E.zip"; - -+class LoggedZipArchiverSandboxSetupHooks : public ZipArchiverSandboxSetupHooks { -+ public: -+ explicit LoggedZipArchiverSandboxSetupHooks( -+ scoped_refptr mojo_task_runner, -+ base::OnceClosure connection_error_handler, -+ chrome_cleaner::ChildProcessLogger* child_process_logger) -+ : ZipArchiverSandboxSetupHooks(std::move(mojo_task_runner), -+ std::move(connection_error_handler)), -+ child_process_logger_(child_process_logger) {} -+ -+ ResultCode UpdateSandboxPolicy(sandbox::TargetPolicy* policy, -+ base::CommandLine* command_line) override { -+ child_process_logger_->UpdateSandboxPolicy(policy); -+ return ZipArchiverSandboxSetupHooks::UpdateSandboxPolicy(policy, -+ command_line); -+ } -+ -+ private: -+ chrome_cleaner::ChildProcessLogger* child_process_logger_; -+}; -+ - class FileRemoverQuarantineTest : public base::MultiProcessTest, - public ::testing::WithParamInterface { - public: - void SetUp() override { - use_reboot_removal_ = GetParam(); - -+ ASSERT_TRUE(child_process_logger_.Initialize()); -+ - scoped_refptr mojo_task_runner = MojoTaskRunner::Create(); -- ZipArchiverSandboxSetupHooks setup_hooks( -+ LoggedZipArchiverSandboxSetupHooks setup_hooks( - mojo_task_runner.get(), base::BindOnce([] { - FAIL() << "ZipArchiver sandbox connection error"; -- })); -- ASSERT_EQ(RESULT_CODE_SUCCESS, -- StartSandboxTarget(MakeCmdLine("FileRemoverQuarantineTargetMain"), -- &setup_hooks, SandboxType::kTest)); -+ }), -+ &child_process_logger_); -+ ResultCode result_code = -+ StartSandboxTarget(MakeCmdLine("FileRemoverQuarantineTargetMain"), -+ &setup_hooks, SandboxType::kTest); -+ if (result_code != RESULT_CODE_SUCCESS) -+ child_process_logger_.DumpLogs(); -+ ASSERT_EQ(RESULT_CODE_SUCCESS, result_code); - - ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - -@@ -447,6 +475,7 @@ class FileRemoverQuarantineTest : public base::MultiProcessTest, - base::test::SingleThreadTaskEnvironment task_environment_; - base::ScopedTempDir temp_dir_; - std::unique_ptr file_remover_; -+ chrome_cleaner::ChildProcessLogger child_process_logger_; - }; - - } // namespace -diff --git a/chrome/chrome_cleaner/parsers/shortcut_parser/broker/BUILD.gn b/chrome/chrome_cleaner/parsers/shortcut_parser/broker/BUILD.gn -index bc7ba8188c83b..09ed07b761a4e 100644 ---- a/chrome/chrome_cleaner/parsers/shortcut_parser/broker/BUILD.gn -+++ b/chrome/chrome_cleaner/parsers/shortcut_parser/broker/BUILD.gn -@@ -67,6 +67,7 @@ source_set("unittest_sources") { - "//chrome/chrome_cleaner/parsers/shortcut_parser:sandboxed_lnk_parser_test_util", - "//chrome/chrome_cleaner/parsers/shortcut_parser/target:lnk_parser", - "//chrome/chrome_cleaner/parsers/target:parser_sandbox_target", -+ "//chrome/chrome_cleaner/test:test_util", - "//mojo/public/cpp/bindings:bindings", - "//sandbox/win:sandbox", - "//testing/gtest", -diff --git a/chrome/chrome_cleaner/parsers/shortcut_parser/broker/sandboxed_shortcut_parser_unittest.cc b/chrome/chrome_cleaner/parsers/shortcut_parser/broker/sandboxed_shortcut_parser_unittest.cc -index 64ac91ed92016..4c033f21c77c3 100644 ---- a/chrome/chrome_cleaner/parsers/shortcut_parser/broker/sandboxed_shortcut_parser_unittest.cc -+++ b/chrome/chrome_cleaner/parsers/shortcut_parser/broker/sandboxed_shortcut_parser_unittest.cc -@@ -18,6 +18,7 @@ - #include "chrome/chrome_cleaner/parsers/broker/sandbox_setup_hooks.h" - #include "chrome/chrome_cleaner/parsers/shortcut_parser/sandboxed_lnk_parser_test_util.h" - #include "chrome/chrome_cleaner/parsers/target/sandbox_setup.h" -+#include "chrome/chrome_cleaner/test/child_process_logger.h" - #include "mojo/public/cpp/bindings/interface_request.h" - #include "mojo/public/cpp/system/platform_handle.h" - #include "sandbox/win/src/sandbox_factory.h" -@@ -31,6 +32,26 @@ constexpr unsigned int kDirQuantity = 5; - - const base::string16 kLnkArguments = L"-a -b -c -d GenericExample"; - -+class LoggedParserSandboxSetupHooks : public ParserSandboxSetupHooks { -+ public: -+ explicit LoggedParserSandboxSetupHooks( -+ scoped_refptr mojo_task_runner, -+ base::OnceClosure connection_error_handler, -+ chrome_cleaner::ChildProcessLogger* child_process_logger) -+ : ParserSandboxSetupHooks(std::move(mojo_task_runner), -+ std::move(connection_error_handler)), -+ child_process_logger_(child_process_logger) {} -+ -+ ResultCode UpdateSandboxPolicy(sandbox::TargetPolicy* policy, -+ base::CommandLine* command_line) override { -+ child_process_logger_->UpdateSandboxPolicy(policy); -+ return ParserSandboxSetupHooks::UpdateSandboxPolicy(policy, command_line); -+ } -+ -+ private: -+ chrome_cleaner::ChildProcessLogger* child_process_logger_; -+}; -+ - } // namespace - - class SandboxedShortcutParserTest : public base::MultiProcessTest { -@@ -40,14 +61,20 @@ class SandboxedShortcutParserTest : public base::MultiProcessTest { - temp_dirs_with_chrome_lnk_(kDirQuantity) {} - - void SetUp() override { -+ ASSERT_TRUE(child_process_logger_.Initialize()); -+ - mojo_task_runner_ = MojoTaskRunner::Create(); - ParserSandboxSetupHooks setup_hooks( - mojo_task_runner_.get(), - base::BindOnce([] { FAIL() << "Parser sandbox connection error"; })); -- ASSERT_EQ( -- RESULT_CODE_SUCCESS, -+ -+ ResultCode result_code = - StartSandboxTarget(MakeCmdLine("SandboxedShortcutParserTargetMain"), -- &setup_hooks, SandboxType::kTest)); -+ &setup_hooks, SandboxType::kTest); -+ if (result_code != RESULT_CODE_SUCCESS) -+ child_process_logger_.DumpLogs(); -+ ASSERT_EQ(RESULT_CODE_SUCCESS, result_code); -+ - parser_ptr_ = setup_hooks.TakeParserPtr(); - shortcut_parser_ = std::make_unique( - mojo_task_runner_.get(), parser_ptr_.get()); -@@ -98,6 +125,8 @@ class SandboxedShortcutParserTest : public base::MultiProcessTest { - base::FilePath not_lnk_file_path_; - - base::test::TaskEnvironment task_environment_; -+ -+ chrome_cleaner::ChildProcessLogger child_process_logger_; - }; - - MULTIPROCESS_TEST_MAIN(SandboxedShortcutParserTargetMain) { diff --git a/srcpkgs/electron7/files/patches/chromium-005-upstream-chromium_version.patch.patch b/srcpkgs/electron7/files/patches/chromium-005-upstream-chromium_version.patch.patch deleted file mode 100644 index 65b8ef4df0a..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-005-upstream-chromium_version.patch.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c1109b707b1eda5d98eb2ed6bd74083bc352f482 Mon Sep 17 00:00:00 2001 -From: chrome-release-bot -Date: Fri, 6 Dec 2019 01:09:50 +0000 -Subject: [PATCH] Incrementing VERSION to 78.0.3904.130 - -TBR=govind@chromium.org - -Change-Id: Ib675653e2605cf2c15ebdbd1320465b08a49994d -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1954709 -Reviewed-by: Chrome Release Bot (LUCI) -Cr-Commit-Position: refs/branch-heads/3904@{#917} -Cr-Branched-From: 675968a8c657a3bd9c1c2c20c5d2935577bbc5e6-refs/heads/master@{#693954} ---- - chrome/VERSION | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chrome/VERSION b/chrome/VERSION -index 7a4383a1ccb7f..50f887f746227 100644 ---- a/chrome/VERSION -+++ b/chrome/VERSION -@@ -1,4 +1,4 @@ - MAJOR=78 - MINOR=0 - BUILD=3904 --PATCH=108 -+PATCH=130 diff --git a/srcpkgs/electron7/files/patches/chromium-77-clang.patch b/srcpkgs/electron7/files/patches/chromium-77-clang.patch deleted file mode 100644 index a57b5a458a4..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-77-clang.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/base/location.h b/base/location.h -index c07e747..924db1c 100644 ---- a/base/location.h -+++ b/base/location.h -@@ -18,7 +18,7 @@ - - namespace base { - --#if defined(__has_builtin) -+#if defined(__clang__) - // Clang allows detection of these builtins. - #define SUPPORTS_LOCATION_BUILTINS \ - (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \ diff --git a/srcpkgs/electron7/files/patches/chromium-77-pulseaudio-13.patch b/srcpkgs/electron7/files/patches/chromium-77-pulseaudio-13.patch deleted file mode 100644 index 892a3183c9d..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-77-pulseaudio-13.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 7ac85fb4cc6f44a21761a591ac497ae3d6bf966d Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Mon, 23 Sep 2019 13:49:53 +0200 -Subject: [PATCH] Fix building with pulseaudio 13 - -The function signature changed though the ABI stayed the same. - -(Modified to apply on chromium sources too) - -Change-Id: I86ca361b5e4f0c523e1031910df438c23beee876 -Fixes: QTBUG-77037 -Reviewed-by: Jüri Valdmann ---- - -diff --git a/media/audio/pulse/pulse.sigs b/media/audio/pulse/pulse.sigs -index 8b58887..daaeb14 100644 ---- a/media/audio/pulse/pulse.sigs -+++ b/media/audio/pulse/pulse.sigs -@@ -24,11 +24,11 @@ - pa_operation* pa_context_get_source_info_by_name(pa_context* c, const char* name, pa_source_info_cb_t cb, void *userdata); - pa_operation* pa_context_get_source_info_list(pa_context* c, pa_source_info_cb_t cb, void* userdata); - pa_operation* pa_context_get_sink_info_list(pa_context* c, pa_sink_info_cb_t cb, void* userdata); --pa_context_state_t pa_context_get_state(pa_context* c); -+pa_context_state_t pa_context_get_state(const_pa_context_ptr c); - pa_context* pa_context_new(pa_mainloop_api* mainloop, const char* name); - pa_operation* pa_context_set_source_volume_by_index(pa_context* c, uint32_t idx, const pa_cvolume* volume, pa_context_success_cb_t cb, void* userdata); - void pa_context_set_state_callback(pa_context* c, pa_context_notify_cb_t cb, void* userdata); --pa_operation_state_t pa_operation_get_state(pa_operation* o); -+pa_operation_state_t pa_operation_get_state(const_pa_operation_ptr o); - void pa_context_unref(pa_context* c); - void pa_operation_unref(pa_operation* o); - int pa_stream_begin_write(pa_stream* p, void** data, size_t* nbytes); -@@ -38,23 +38,23 @@ - int pa_stream_disconnect(pa_stream* s); - int pa_stream_drop(pa_stream *p); - pa_operation* pa_stream_flush(pa_stream* s, pa_stream_success_cb_t cb, void* userdata); --uint32_t pa_stream_get_device_index(pa_stream* s); -+uint32_t pa_stream_get_device_index(const_pa_stream_ptr s); - int pa_stream_get_latency(pa_stream* s, pa_usec_t* r_usec, int* negative); --pa_stream_state_t pa_stream_get_state(pa_stream* p); -+pa_stream_state_t pa_stream_get_state(const_pa_stream_ptr p); - pa_stream* pa_stream_new(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map * map); - pa_stream* pa_stream_new_with_proplist(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map* map, pa_proplist* p); - pa_proplist* pa_proplist_new(void); --int pa_proplist_contains(pa_proplist* p, const char* key); -+int pa_proplist_contains(const_pa_proplist_ptr p, const char* key); - void pa_proplist_free(pa_proplist* p); --const char* pa_proplist_gets(pa_proplist* p, const char* key); -+const char* pa_proplist_gets(const_pa_proplist_ptr p, const char* key); - int pa_proplist_sets(pa_proplist* p, const char* key, const char* value); --size_t pa_stream_readable_size(pa_stream *p); -+size_t pa_stream_readable_size(const_pa_stream_ptr p); - int pa_stream_peek(pa_stream* p, const void** data, size_t* nbytes); - void pa_stream_set_read_callback(pa_stream* p, pa_stream_request_cb_t cb, void* userdata); - void pa_stream_set_state_callback(pa_stream* s, pa_stream_notify_cb_t cb, void* userdata); - int pa_stream_write(pa_stream* p, const void* data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek); - void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata); - void pa_stream_unref(pa_stream* s); --int pa_context_errno(pa_context *c); -+int pa_context_errno(const_pa_context_ptr c); - const char* pa_strerror(int error); - pa_cvolume* pa_cvolume_set(pa_cvolume* a, unsigned channels, pa_volume_t v); -diff --git a/chromium/media/audio/pulse/pulse_stub_header.fragment b/chromium/media/audio/pulse/pulse_stub_header.fragment -index 2a2d3e7..cdaa841 100644 ---- a/media/audio/pulse/pulse_stub_header.fragment -+++ b/media/audio/pulse/pulse_stub_header.fragment -@@ -5,4 +5,15 @@ - - #include - -+#if PA_MAJOR > 12 -+typedef const pa_context* const_pa_context_ptr; -+typedef const pa_operation* const_pa_operation_ptr; -+typedef const pa_proplist* const_pa_proplist_ptr; -+typedef const pa_stream* const_pa_stream_ptr; -+#else -+typedef pa_context* const_pa_context_ptr; -+typedef pa_operation* const_pa_operation_ptr; -+typedef pa_proplist* const_pa_proplist_ptr; -+typedef pa_stream* const_pa_stream_ptr; -+#endif - } diff --git a/srcpkgs/electron7/files/patches/chromium-77-system-icu.patch b/srcpkgs/electron7/files/patches/chromium-77-system-icu.patch deleted file mode 100644 index 1f848d7ee2b..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-77-system-icu.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn -index 4450e40..9ca36dd 100644 ---- a/build/linux/unbundle/icu.gn -+++ b/build/linux/unbundle/icu.gn -@@ -96,6 +96,7 @@ shim_headers("icui18n_shim") { - "unicode/fpositer.h", - "unicode/gender.h", - "unicode/gregocal.h", -+ "unicode/listformatter.h", - "unicode/measfmt.h", - "unicode/measunit.h", - "unicode/measure.h", -@@ -178,7 +179,6 @@ shim_headers("icuuc_shim") { - "unicode/icudataver.h", - "unicode/icuplug.h", - "unicode/idna.h", -- "unicode/listformatter.h", - "unicode/localpointer.h", - "unicode/locdspnm.h", - "unicode/locid.h", diff --git a/srcpkgs/electron7/files/patches/chromium-78-gcc-alignas.patch b/srcpkgs/electron7/files/patches/chromium-78-gcc-alignas.patch deleted file mode 100644 index bce4118596b..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-gcc-alignas.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 6b633c4b14850df376d5cec571699018772f358e Mon Sep 17 00:00:00 2001 -From: Tomas Popela -Date: Tue, 17 Sep 2019 19:48:48 +0000 -Subject: [PATCH] GCC: Can't use alignas() together with __attribute__() - -It's because GCC has problems when mixing the alignas() together with -__attribute__() (that is used to export the symbols). The best -solution is to use ALIGNAS() macro from //base/compiler_specific.h -together with alignof() to have the equal functionality that compiles on -GCC as well as on clang. - -Bug: 819294 -Change-Id: Ieb169592a2965f17a18bfc88d28418eb723a4e5a -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1806735 -Auto-Submit: Tom Popela -Commit-Queue: Alex Clarke -Reviewed-by: Alex Clarke -Cr-Commit-Position: refs/heads/master@{#697330} ---- - -diff --git a/base/task/promise/dependent_list.h b/base/task/promise/dependent_list.h -index 020bdbfc..3245c1c 100644 ---- a/base/task/promise/dependent_list.h -+++ b/base/task/promise/dependent_list.h -@@ -59,7 +59,7 @@ - - // Align Node on an 8-byte boundary to ensure the first 3 bits are 0 and can - // be used to store additional state (see static_asserts below). -- class BASE_EXPORT alignas(8) Node { -+ class BASE_EXPORT ALIGNAS(8) Node { - public: - Node(); - explicit Node(Node&& other) noexcept; - -Re-use chromium alignas workaround in protobuf. ---- - -diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc b/third_party/protobuf/src/google/protobuf/port_def.inc -index f1bd85d..9c204a1 100644 ---- a/third_party/protobuf/src/google/protobuf/port_def.inc -+++ b/third_party/protobuf/src/google/protobuf/port_def.inc -@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport)); - #undef IN - #endif // _MSC_VER - -+// Specify memory alignment for structs, classes, etc. -+// Use like: -+// class PROTOBUF_ALIGNAS(16) MyClass { ... } -+// PROTOBUF_ALIGNAS(16) int array[4]; -+// -+// In most places you can use the C++11 keyword "alignas", which is preferred. -+// -+// But compilers have trouble mixing __attribute__((...)) syntax with -+// alignas(...) syntax. -+// -+// Doesn't work in clang or gcc: -+// struct alignas(16) __attribute__((packed)) S { char c; }; -+// Works in clang but not gcc: -+// struct __attribute__((packed)) alignas(16) S2 { char c; }; -+// Works in clang and gcc: -+// struct alignas(16) S3 { char c; } __attribute__((packed)); -+// -+// There are also some attributes that must be specified *before* a class -+// definition: visibility (used for exporting functions/classes) is one of -+// these attributes. This means that it is not possible to use alignas() with a -+// class that is marked as exported. -+#if defined(_MSC_VER) -+#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment)) -+#elif defined(__GNUC__) -+#define PROTOBUF_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) -+#else -+#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment) -+#endif -+ - #if defined(__clang__) - #pragma clang diagnostic push - // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many -diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/protobuf/src/google/protobuf/arena.h -index dedc221..a8515ce 100644 ---- a/third_party/protobuf/src/google/protobuf/arena.h -+++ b/third_party/protobuf/src/google/protobuf/arena.h -@@ -245,7 +245,7 @@ struct ArenaOptions { - // well as protobuf container types like RepeatedPtrField and Map. The protocol - // is internal to protobuf and is not guaranteed to be stable. Non-proto types - // should not rely on this protocol. --class PROTOBUF_EXPORT alignas(8) Arena final { -+class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final { - public: - // Arena constructor taking custom options. See ArenaOptions below for - // descriptions of the options available. -diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc b/third_party/protobuf/src/google/protobuf/port_undef.inc -index b7e67fe..ba1fffc 100644 ---- a/third_party/protobuf/src/google/protobuf/port_undef.inc -+++ b/third_party/protobuf/src/google/protobuf/port_undef.inc -@@ -80,6 +80,7 @@ - #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec - #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport - #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport -+#undef PROTOBUF_ALIGNAS - - - diff --git a/srcpkgs/electron7/files/patches/chromium-78-gcc-enum-range.patch b/srcpkgs/electron7/files/patches/chromium-78-gcc-enum-range.patch deleted file mode 100644 index 9c15e954b4e..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-gcc-enum-range.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9662ec844017690d5fd56bf0f05ef6a540dd29c1 Mon Sep 17 00:00:00 2001 -From: Tom Anderson -Date: Mon, 09 Sep 2019 19:06:01 +0000 -Subject: [PATCH] Fix GCC build error - -Fixes this error: -[ 375s] In file included from ../../base/task/common/intrusive_heap.h:8, -[ 375s] from ../../base/task/thread_pool/task_source.h:17, -[ 375s] from ../../base/task/thread_pool/task_tracker.h:27, -[ 375s] from ./../../base/task/thread_pool/service_thread.cc:14, -[ 375s] from gen/base/base_jumbo_28.cc:5: -[ 375s] ../../base/containers/intrusive_heap.h:152:36: error: enumerator value - '-1' is outside the range of underlying type 'size_t' {aka 'long unsigned int'} -[ 375s] 152 | enum : size_t { kInvalidIndex = -1 }; -[ 375s] | - -Change-Id: I6044fb704931b2f8416f6b19a247ae297cd7b0d6 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792763 -Commit-Queue: Thomas Anderson -Commit-Queue: Lei Zhang -Reviewed-by: Lei Zhang -Auto-Submit: Thomas Anderson -Cr-Commit-Position: refs/heads/master@{#694853} ---- - -diff --git a/base/containers/intrusive_heap.h b/base/containers/intrusive_heap.h -index 53d3909..d7626bb 100644 ---- a/base/containers/intrusive_heap.h -+++ b/base/containers/intrusive_heap.h -@@ -131,6 +131,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -149,7 +150,7 @@ - // in place. - class BASE_EXPORT HeapHandle { - public: -- enum : size_t { kInvalidIndex = -1 }; -+ enum : size_t { kInvalidIndex = std::numeric_limits::max() }; - - constexpr HeapHandle() = default; - constexpr HeapHandle(const HeapHandle& other) = default; diff --git a/srcpkgs/electron7/files/patches/chromium-78-gcc-noexcept.patch b/srcpkgs/electron7/files/patches/chromium-78-gcc-noexcept.patch deleted file mode 100644 index 8ddb53fe82d..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-gcc-noexcept.patch +++ /dev/null @@ -1,32 +0,0 @@ -From d16cda8fc3476cc534a756873cc8aa2692a57054 Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Thu, 22 Aug 2019 13:13:36 +0200 -Subject: [PATCH] GCC: declare noexcept move constructor/assign operators of V8StackTraceId - -blink::BlinkCloneableMessage declares default implementation of -move operator/assign operator that requires v8_inspector::V8StackTraceId -to declare its move constructor/assign operator too. - -Bug: chromium:819294 -Change-Id: Iaf626ee8245efcba372a17cdf2de448e691d41d6 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1796062 -Commit-Queue: José Dapena Paz -Reviewed-by: Yang Guo -Cr-Commit-Position: refs/heads/master@{#63799} ---- - -diff --git a/v8/include/v8-inspector.h b/v8/include/v8-inspector.h -index ce5b777..ed4cdec 100644 ---- a/v8/include/v8-inspector.h -+++ b/v8/include/v8-inspector.h -@@ -231,7 +231,10 @@ struct V8_EXPORT V8StackTraceId { - std::pair debugger_id; - - V8StackTraceId(); -+ V8StackTraceId(const V8StackTraceId&) = default; - V8StackTraceId(uintptr_t id, const std::pair debugger_id); -+ V8StackTraceId& operator=(const V8StackTraceId&) = default; -+ V8StackTraceId& operator=(V8StackTraceId&&) noexcept = default; - ~V8StackTraceId() = default; - - bool IsInvalid() const; diff --git a/srcpkgs/electron7/files/patches/chromium-78-icon.patch b/srcpkgs/electron7/files/patches/chromium-78-icon.patch deleted file mode 100644 index 2cca7f10d19..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-icon.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc -index 7a3a6eb..7c01534 100644 ---- a/ui/platform_window/x11/x11_window.cc -+++ b/ui/platform_window/x11/x11_window.cc -@@ -67,6 +67,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( - config.wm_role_name = properties.wm_role_name; - config.activatable = properties.activatable; - config.visual_id = properties.x_visual_id; -+ config.icon = properties.icon; - return config; - } - diff --git a/srcpkgs/electron7/files/patches/chromium-78-include.patch b/srcpkgs/electron7/files/patches/chromium-78-include.patch deleted file mode 100644 index 3db38eac1c9..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-include.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bbfe2665923225b4a7c436ba2b6c7e5f695f2e52 Mon Sep 17 00:00:00 2001 -From: David Landell -Date: Fri, 13 Sep 2019 12:24:13 +0000 -Subject: [PATCH] Add missing include for unique_ptr - -Change-Id: I614d2f42868d563eb6a92dfb2aae08286e20d687 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803137 -Reviewed-by: Henrik Boström -Commit-Queue: Henrik Boström -Cr-Commit-Position: refs/heads/master@{#696355} ---- - -diff --git a/third_party/blink/public/platform/web_rtc_rtp_source.h b/third_party/blink/public/platform/web_rtc_rtp_source.h -index 959440f..c3fd542 100644 ---- a/third_party/blink/public/platform/web_rtc_rtp_source.h -+++ b/third_party/blink/public/platform/web_rtc_rtp_source.h -@@ -5,6 +5,8 @@ - #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_RTC_RTP_SOURCE_H_ - #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_RTC_RTP_SOURCE_H_ - -+#include -+ - #include "base/optional.h" - #include "third_party/blink/public/platform/web_common.h" - -Missing include due to reverting ProfileManagerObserver ---- - -diff --git a/chrome/browser/web_applications/extensions/bookmark_app_util.cc b/chrome/browser/web_applications/extensions/bookmark_app_util.cc -index ee4b70a..b31e5f5 100644 ---- a/chrome/browser/web_applications/extensions/bookmark_app_util.cc -+++ b/chrome/browser/web_applications/extensions/bookmark_app_util.cc -@@ -7,6 +7,7 @@ - #include "base/strings/string_piece.h" - #include "base/values.h" - #include "chrome/browser/extensions/extension_service.h" -+#include "chrome/browser/profiles/profile.h" - #include "chrome/browser/web_applications/components/app_registrar.h" - #include "chrome/browser/web_applications/components/web_app_provider_base.h" - #include "chrome/common/chrome_features.h" diff --git a/srcpkgs/electron7/files/patches/chromium-78-pm-crash.patch b/srcpkgs/electron7/files/patches/chromium-78-pm-crash.patch deleted file mode 100644 index ada266120dc..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-pm-crash.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e73aed9a5ef15102f29ac31b70290faf5c90f9fe Mon Sep 17 00:00:00 2001 -From: Evan Stade -Date: Wed, 16 Oct 2019 16:01:32 +0000 -Subject: [PATCH] Fix shutdown crash in ProfileManager. - -OnProfileMarkedForPermanentDeletion should move from -ProfileManagerObserver to ProfileObserver, which would also -fix this bug. However, changing the order of members is the -quickest and most cherry-pick-able way to avoid the crash. - -Bug: 1005244 -Change-Id: If2db68c846dd418cd02864b57b9b543687fa1e03 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863518 -Auto-Submit: Evan Stade -Reviewed-by: David Roger -Commit-Queue: Evan Stade -Cr-Commit-Position: refs/heads/master@{#706467} ---- - -diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h -index b60df76d..7d02af7 100644 ---- a/chrome/browser/profiles/profile_manager.h -+++ b/chrome/browser/profiles/profile_manager.h -@@ -409,6 +409,10 @@ class ProfileManager : public content::NotificationObserver, - const base::FilePath& profile_dir); - #endif // !defined(OS_ANDROID) - -+ // Destroy after |profile_info_cache_| since Profile destruction may trigger -+ // some observers to unregister themselves. -+ base::ObserverList observers_; -+ - // Object to cache various information about profiles. Contains information - // about every profile which has been created for this instance of Chrome, - // if it has not been explicitly deleted. It must be destroyed after -@@ -450,8 +454,6 @@ class ProfileManager : public content::NotificationObserver, - // Controls whether to initialize some services. Only disabled for testing. - bool do_final_services_init_ = true; - -- base::ObserverList observers_; -- - // TODO(chrome/browser/profiles/OWNERS): Usage of this in profile_manager.cc - // should likely be turned into DCHECK_CURRENTLY_ON(BrowserThread::UI) for - // consistency with surrounding code in the same file but that wasn't trivial diff --git a/srcpkgs/electron7/files/patches/chromium-78-protobuf-export.patch b/srcpkgs/electron7/files/patches/chromium-78-protobuf-export.patch deleted file mode 100644 index ddb9e80eefe..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-protobuf-export.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/protobuf/src/google/protobuf/repeated_field.h b/third_party/protobuf/src/google/protobuf/repeated_field.h -index b5b193c..4434854 100644 ---- a/third_party/protobuf/src/google/protobuf/repeated_field.h -+++ b/third_party/protobuf/src/google/protobuf/repeated_field.h -@@ -804,7 +804,7 @@ class StringTypeHandler { - // RepeatedPtrField is like RepeatedField, but used for repeated strings or - // Messages. - template --class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { -+class PROTOBUF_EXPORT RepeatedPtrField final : private internal::RepeatedPtrFieldBase { - public: - RepeatedPtrField(); - explicit RepeatedPtrField(Arena* arena); diff --git a/srcpkgs/electron7/files/patches/chromium-78-revert-noexcept-r1.patch b/srcpkgs/electron7/files/patches/chromium-78-revert-noexcept-r1.patch deleted file mode 100644 index 408d618b541..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-78-revert-noexcept-r1.patch +++ /dev/null @@ -1,1471 +0,0 @@ -From 37a95dd93e553888c00cf9443a5ec738ce658e65 Mon Sep 17 00:00:00 2001 -From: Zinovy Nis -Date: Mon, 16 Sep 2019 13:08:17 +0000 -Subject: [PATCH] Revert "[clang-tidy] add noexcept for move ctors and operator= in blink" - -This reverts commit 8f3eea10fe63a64ac67dc21542ebee6b896156a3. - -Reason for revert: code bloating - -Original change's description: -> [clang-tidy] add noexcept for move ctors and operator= in blink -> -> Bug: 994915 -> Change-Id: I2e1bcf286a2d2fa6613e18b5268098a0d258fb2e -> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1759163 -> Commit-Queue: Zinovy Nis -> Reviewed-by: Jeremy Roman -> Reviewed-by: Mike West -> Cr-Commit-Position: refs/heads/master@{#688676} - -TBR=jbroman@chromium.org,foolip@chromium.org,mkwst@chromium.org,zynis@yandex-team.ru - -# Not skipping CQ checks because original CL landed > 1 day ago. - -Bug: 994915 -Change-Id: I12b3ecc1186e27809082dc399c6d6864109ce307 ---- - -diff --git a/third_party/blink/common/indexeddb/indexeddb_key_path.cc b/third_party/blink/common/indexeddb/indexeddb_key_path.cc -index ec2b618..552d541 100644 ---- a/third_party/blink/common/indexeddb/indexeddb_key_path.cc -+++ b/third_party/blink/common/indexeddb/indexeddb_key_path.cc -@@ -18,12 +18,12 @@ - : type_(mojom::IDBKeyPathType::Array), array_(array) {} - - IndexedDBKeyPath::IndexedDBKeyPath(const IndexedDBKeyPath& other) = default; --IndexedDBKeyPath::IndexedDBKeyPath(IndexedDBKeyPath&& other) noexcept = default; -+IndexedDBKeyPath::IndexedDBKeyPath(IndexedDBKeyPath&& other) = default; - IndexedDBKeyPath::~IndexedDBKeyPath() = default; - IndexedDBKeyPath& IndexedDBKeyPath::operator=(const IndexedDBKeyPath& other) = - default; --IndexedDBKeyPath& IndexedDBKeyPath::operator=( -- IndexedDBKeyPath&& other) noexcept = default; -+IndexedDBKeyPath& IndexedDBKeyPath::operator=(IndexedDBKeyPath&& other) = -+ default; - - const std::vector& IndexedDBKeyPath::array() const { - DCHECK(type_ == blink::mojom::IDBKeyPathType::Array); -diff --git a/third_party/blink/common/indexeddb/indexeddb_metadata.cc b/third_party/blink/common/indexeddb/indexeddb_metadata.cc -index 50d5845..9349732 100644 ---- a/third_party/blink/common/indexeddb/indexeddb_metadata.cc -+++ b/third_party/blink/common/indexeddb/indexeddb_metadata.cc -@@ -23,15 +23,15 @@ - - IndexedDBIndexMetadata::IndexedDBIndexMetadata( - const IndexedDBIndexMetadata& other) = default; --IndexedDBIndexMetadata::IndexedDBIndexMetadata( -- IndexedDBIndexMetadata&& other) noexcept = default; -+IndexedDBIndexMetadata::IndexedDBIndexMetadata(IndexedDBIndexMetadata&& other) = -+ default; - - IndexedDBIndexMetadata::~IndexedDBIndexMetadata() = default; - - IndexedDBIndexMetadata& IndexedDBIndexMetadata::operator=( - const IndexedDBIndexMetadata& other) = default; - IndexedDBIndexMetadata& IndexedDBIndexMetadata::operator=( -- IndexedDBIndexMetadata&& other) noexcept = default; -+ IndexedDBIndexMetadata&& other) = default; - - bool IndexedDBIndexMetadata::operator==( - const IndexedDBIndexMetadata& other) const { -@@ -56,14 +56,14 @@ - IndexedDBObjectStoreMetadata::IndexedDBObjectStoreMetadata( - const IndexedDBObjectStoreMetadata& other) = default; - IndexedDBObjectStoreMetadata::IndexedDBObjectStoreMetadata( -- IndexedDBObjectStoreMetadata&& other) noexcept = default; -+ IndexedDBObjectStoreMetadata&& other) = default; - - IndexedDBObjectStoreMetadata::~IndexedDBObjectStoreMetadata() = default; - - IndexedDBObjectStoreMetadata& IndexedDBObjectStoreMetadata::operator=( - const IndexedDBObjectStoreMetadata& other) = default; - IndexedDBObjectStoreMetadata& IndexedDBObjectStoreMetadata::operator=( -- IndexedDBObjectStoreMetadata&& other) noexcept = default; -+ IndexedDBObjectStoreMetadata&& other) = default; - - bool IndexedDBObjectStoreMetadata::operator==( - const IndexedDBObjectStoreMetadata& other) const { -@@ -87,14 +87,14 @@ - IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata( - const IndexedDBDatabaseMetadata& other) = default; - IndexedDBDatabaseMetadata::IndexedDBDatabaseMetadata( -- IndexedDBDatabaseMetadata&& other) noexcept = default; -+ IndexedDBDatabaseMetadata&& other) = default; - - IndexedDBDatabaseMetadata::~IndexedDBDatabaseMetadata() = default; - - IndexedDBDatabaseMetadata& IndexedDBDatabaseMetadata::operator=( - const IndexedDBDatabaseMetadata& other) = default; - IndexedDBDatabaseMetadata& IndexedDBDatabaseMetadata::operator=( -- IndexedDBDatabaseMetadata&& other) noexcept = default; -+ IndexedDBDatabaseMetadata&& other) = default; - - bool IndexedDBDatabaseMetadata::operator==( - const IndexedDBDatabaseMetadata& other) const { -diff --git a/third_party/blink/common/mediastream/media_devices.cc b/third_party/blink/common/mediastream/media_devices.cc -index 93df201..3661b4b 100644 ---- a/third_party/blink/common/mediastream/media_devices.cc -+++ b/third_party/blink/common/mediastream/media_devices.cc -@@ -13,8 +13,7 @@ - WebMediaDeviceInfo::WebMediaDeviceInfo(const WebMediaDeviceInfo& other) = - default; - --WebMediaDeviceInfo::WebMediaDeviceInfo(WebMediaDeviceInfo&& other) noexcept = -- default; -+WebMediaDeviceInfo::WebMediaDeviceInfo(WebMediaDeviceInfo&& other) = default; - - WebMediaDeviceInfo::WebMediaDeviceInfo(const std::string& device_id, - const std::string& label, -@@ -36,8 +35,8 @@ - WebMediaDeviceInfo& WebMediaDeviceInfo::operator=( - const WebMediaDeviceInfo& other) = default; - --WebMediaDeviceInfo& WebMediaDeviceInfo::operator=( -- WebMediaDeviceInfo&& other) noexcept = default; -+WebMediaDeviceInfo& WebMediaDeviceInfo::operator=(WebMediaDeviceInfo&& other) = -+ default; - - bool operator==(const WebMediaDeviceInfo& first, - const WebMediaDeviceInfo& second) { -diff --git a/third_party/blink/common/messaging/cloneable_message.cc b/third_party/blink/common/messaging/cloneable_message.cc -index 2984fd1..5c3ee7e 100644 ---- a/third_party/blink/common/messaging/cloneable_message.cc -+++ b/third_party/blink/common/messaging/cloneable_message.cc -@@ -12,9 +12,8 @@ - namespace blink { - - CloneableMessage::CloneableMessage() = default; --CloneableMessage::CloneableMessage(CloneableMessage&&) noexcept = default; --CloneableMessage& CloneableMessage::operator=(CloneableMessage&&) noexcept = -- default; -+CloneableMessage::CloneableMessage(CloneableMessage&&) = default; -+CloneableMessage& CloneableMessage::operator=(CloneableMessage&&) = default; - CloneableMessage::~CloneableMessage() = default; - - CloneableMessage CloneableMessage::ShallowClone() const { -diff --git a/third_party/blink/common/messaging/transferable_message.cc b/third_party/blink/common/messaging/transferable_message.cc -index 07ac9bb..4a69d0a 100644 ---- a/third_party/blink/common/messaging/transferable_message.cc -+++ b/third_party/blink/common/messaging/transferable_message.cc -@@ -9,10 +9,9 @@ - namespace blink { - - TransferableMessage::TransferableMessage() = default; --TransferableMessage::TransferableMessage(TransferableMessage&&) noexcept = -+TransferableMessage::TransferableMessage(TransferableMessage&&) = default; -+TransferableMessage& TransferableMessage::operator=(TransferableMessage&&) = - default; --TransferableMessage& TransferableMessage::operator=( -- TransferableMessage&&) noexcept = default; - TransferableMessage::~TransferableMessage() = default; - - } // namespace blink -diff --git a/third_party/blink/public/common/indexeddb/indexeddb_key_path.h b/third_party/blink/public/common/indexeddb/indexeddb_key_path.h -index 8ebe10c..9f5422c 100644 ---- a/third_party/blink/public/common/indexeddb/indexeddb_key_path.h -+++ b/third_party/blink/public/common/indexeddb/indexeddb_key_path.h -@@ -22,10 +22,10 @@ - explicit IndexedDBKeyPath(const base::string16&); - explicit IndexedDBKeyPath(const std::vector&); - IndexedDBKeyPath(const IndexedDBKeyPath& other); -- IndexedDBKeyPath(IndexedDBKeyPath&& other) noexcept; -+ IndexedDBKeyPath(IndexedDBKeyPath&& other); - ~IndexedDBKeyPath(); - IndexedDBKeyPath& operator=(const IndexedDBKeyPath& other); -- IndexedDBKeyPath& operator=(IndexedDBKeyPath&& other) noexcept; -+ IndexedDBKeyPath& operator=(IndexedDBKeyPath&& other); - - bool IsNull() const { return type_ == blink::mojom::IDBKeyPathType::Null; } - bool operator==(const IndexedDBKeyPath& other) const; -diff --git a/third_party/blink/public/common/indexeddb/indexeddb_metadata.h b/third_party/blink/public/common/indexeddb/indexeddb_metadata.h -index 15663f6..7bb37c9 100644 ---- a/third_party/blink/public/common/indexeddb/indexeddb_metadata.h -+++ b/third_party/blink/public/common/indexeddb/indexeddb_metadata.h -@@ -26,10 +26,10 @@ - bool unique, - bool multi_entry); - IndexedDBIndexMetadata(const IndexedDBIndexMetadata& other); -- IndexedDBIndexMetadata(IndexedDBIndexMetadata&& other) noexcept; -+ IndexedDBIndexMetadata(IndexedDBIndexMetadata&& other); - ~IndexedDBIndexMetadata(); - IndexedDBIndexMetadata& operator=(const IndexedDBIndexMetadata& other); -- IndexedDBIndexMetadata& operator=(IndexedDBIndexMetadata&& other) noexcept; -+ IndexedDBIndexMetadata& operator=(IndexedDBIndexMetadata&& other); - bool operator==(const IndexedDBIndexMetadata& other) const; - - base::string16 name; -@@ -50,12 +50,11 @@ - bool auto_increment, - int64_t max_index_id); - IndexedDBObjectStoreMetadata(const IndexedDBObjectStoreMetadata& other); -- IndexedDBObjectStoreMetadata(IndexedDBObjectStoreMetadata&& other) noexcept; -+ IndexedDBObjectStoreMetadata(IndexedDBObjectStoreMetadata&& other); - ~IndexedDBObjectStoreMetadata(); - IndexedDBObjectStoreMetadata& operator=( - const IndexedDBObjectStoreMetadata& other); -- IndexedDBObjectStoreMetadata& operator=( -- IndexedDBObjectStoreMetadata&& other) noexcept; -+ IndexedDBObjectStoreMetadata& operator=(IndexedDBObjectStoreMetadata&& other); - bool operator==(const IndexedDBObjectStoreMetadata& other) const; - - base::string16 name; -@@ -77,11 +76,10 @@ - int64_t version, - int64_t max_object_store_id); - IndexedDBDatabaseMetadata(const IndexedDBDatabaseMetadata& other); -- IndexedDBDatabaseMetadata(IndexedDBDatabaseMetadata&& other) noexcept; -+ IndexedDBDatabaseMetadata(IndexedDBDatabaseMetadata&& other); - ~IndexedDBDatabaseMetadata(); - IndexedDBDatabaseMetadata& operator=(const IndexedDBDatabaseMetadata& other); -- IndexedDBDatabaseMetadata& operator=( -- IndexedDBDatabaseMetadata&& other) noexcept; -+ IndexedDBDatabaseMetadata& operator=(IndexedDBDatabaseMetadata&& other); - bool operator==(const IndexedDBDatabaseMetadata& other) const; - - base::string16 name; -diff --git a/third_party/blink/public/common/mediastream/media_devices.h b/third_party/blink/public/common/mediastream/media_devices.h -index 0d63e575..d87affe 100644 ---- a/third_party/blink/public/common/mediastream/media_devices.h -+++ b/third_party/blink/public/common/mediastream/media_devices.h -@@ -27,7 +27,7 @@ - struct BLINK_COMMON_EXPORT WebMediaDeviceInfo { - WebMediaDeviceInfo(); - WebMediaDeviceInfo(const WebMediaDeviceInfo& other); -- WebMediaDeviceInfo(WebMediaDeviceInfo&& other) noexcept; -+ WebMediaDeviceInfo(WebMediaDeviceInfo&& other); - WebMediaDeviceInfo( - const std::string& device_id, - const std::string& label, -@@ -37,7 +37,7 @@ - const media::VideoCaptureDeviceDescriptor& descriptor); - ~WebMediaDeviceInfo(); - WebMediaDeviceInfo& operator=(const WebMediaDeviceInfo& other); -- WebMediaDeviceInfo& operator=(WebMediaDeviceInfo&& other) noexcept; -+ WebMediaDeviceInfo& operator=(WebMediaDeviceInfo&& other); - - std::string device_id; - std::string label; -diff --git a/third_party/blink/public/common/messaging/cloneable_message.h b/third_party/blink/public/common/messaging/cloneable_message.h -index de9952d..8dbd910 100644 ---- a/third_party/blink/public/common/messaging/cloneable_message.h -+++ b/third_party/blink/public/common/messaging/cloneable_message.h -@@ -21,8 +21,8 @@ - // This type can be serialized as a blink::mojom::CloneableMessage struct. - struct BLINK_COMMON_EXPORT CloneableMessage { - CloneableMessage(); -- CloneableMessage(CloneableMessage&&) noexcept; -- CloneableMessage& operator=(CloneableMessage&&) noexcept; -+ CloneableMessage(CloneableMessage&&); -+ CloneableMessage& operator=(CloneableMessage&&); - ~CloneableMessage(); - - // Returns a shallow clone of this message. |encoded_message| in the clone -diff --git a/third_party/blink/public/common/messaging/transferable_message.h b/third_party/blink/public/common/messaging/transferable_message.h -index 5eef63c..2d87363 100644 ---- a/third_party/blink/public/common/messaging/transferable_message.h -+++ b/third_party/blink/public/common/messaging/transferable_message.h -@@ -22,8 +22,8 @@ - // type can be serialized as a blink::mojom::TransferableMessage struct. - struct BLINK_COMMON_EXPORT TransferableMessage : public CloneableMessage { - TransferableMessage(); -- TransferableMessage(TransferableMessage&&) noexcept; -- TransferableMessage& operator=(TransferableMessage&&) noexcept; -+ TransferableMessage(TransferableMessage&&); -+ TransferableMessage& operator=(TransferableMessage&&); - ~TransferableMessage(); - - // Any ports being transferred as part of this message. -diff --git a/third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h b/third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h -index 75f3ae16..81edd69 100644 ---- a/third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h -+++ b/third_party/blink/public/platform/scheduler/web_scoped_virtual_time_pauser.h -@@ -42,9 +42,8 @@ - WebScopedVirtualTimePauser(); - ~WebScopedVirtualTimePauser(); - -- WebScopedVirtualTimePauser(WebScopedVirtualTimePauser&& other) noexcept; -- WebScopedVirtualTimePauser& operator=( -- WebScopedVirtualTimePauser&& other) noexcept; -+ WebScopedVirtualTimePauser(WebScopedVirtualTimePauser&& other); -+ WebScopedVirtualTimePauser& operator=(WebScopedVirtualTimePauser&& other); - - WebScopedVirtualTimePauser(const WebScopedVirtualTimePauser&) = delete; - WebScopedVirtualTimePauser& operator=(const WebScopedVirtualTimePauser&) = -diff --git a/third_party/blink/public/platform/web_string.h b/third_party/blink/public/platform/web_string.h -index e4fda4f..ffd1da0 100644 ---- a/third_party/blink/public/platform/web_string.h -+++ b/third_party/blink/public/platform/web_string.h -@@ -102,10 +102,10 @@ - BLINK_PLATFORM_EXPORT WebString(const WebUChar* data, size_t len); - - BLINK_PLATFORM_EXPORT WebString(const WebString&); -- BLINK_PLATFORM_EXPORT WebString(WebString&&) noexcept; -+ BLINK_PLATFORM_EXPORT WebString(WebString&&); - - BLINK_PLATFORM_EXPORT WebString& operator=(const WebString&); -- BLINK_PLATFORM_EXPORT WebString& operator=(WebString&&) noexcept; -+ BLINK_PLATFORM_EXPORT WebString& operator=(WebString&&); - - BLINK_PLATFORM_EXPORT void Reset(); - -diff --git a/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util.h b/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util.h -index 99f47f5..8451b86 100644 ---- a/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util.h -+++ b/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util.h -@@ -73,8 +73,8 @@ - - VideoCaptureSettings(const VideoCaptureSettings& other); - VideoCaptureSettings& operator=(const VideoCaptureSettings& other); -- VideoCaptureSettings(VideoCaptureSettings&& other) noexcept; -- VideoCaptureSettings& operator=(VideoCaptureSettings&& other) noexcept; -+ VideoCaptureSettings(VideoCaptureSettings&& other); -+ VideoCaptureSettings& operator=(VideoCaptureSettings&& other); - ~VideoCaptureSettings(); - - bool HasValue() const { return !failed_constraint_name_; } -@@ -193,8 +193,8 @@ - const AudioProcessingProperties& audio_processing_properties); - AudioCaptureSettings(const AudioCaptureSettings& other); - AudioCaptureSettings& operator=(const AudioCaptureSettings& other); -- AudioCaptureSettings(AudioCaptureSettings&& other) noexcept; -- AudioCaptureSettings& operator=(AudioCaptureSettings&& other) noexcept; -+ AudioCaptureSettings(AudioCaptureSettings&& other); -+ AudioCaptureSettings& operator=(AudioCaptureSettings&& other); - - bool HasValue() const { return !failed_constraint_name_; } - -diff --git a/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h b/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h -index 199bdeb..c89e6e9 100644 ---- a/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h -+++ b/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h -@@ -159,8 +159,8 @@ - - DiscreteSet(const DiscreteSet& other) = default; - DiscreteSet& operator=(const DiscreteSet& other) = default; -- DiscreteSet(DiscreteSet&& other) noexcept = default; -- DiscreteSet& operator=(DiscreteSet&& other) noexcept = default; -+ DiscreteSet(DiscreteSet&& other) = default; -+ DiscreteSet& operator=(DiscreteSet&& other) = default; - ~DiscreteSet() = default; - - bool Contains(const T& value) const { -diff --git a/third_party/blink/public/web/modules/mediastream/media_stream_video_source.h b/third_party/blink/public/web/modules/mediastream/media_stream_video_source.h -index 5e50d1b..ed5967f 100644 ---- a/third_party/blink/public/web/modules/mediastream/media_stream_video_source.h -+++ b/third_party/blink/public/web/modules/mediastream/media_stream_video_source.h -@@ -285,8 +285,8 @@ - const VideoTrackFormatCallback& format_callback, - std::unique_ptr adapter_settings, - const ConstraintsCallback& callback); -- PendingTrackInfo(PendingTrackInfo&& other) noexcept; -- PendingTrackInfo& operator=(PendingTrackInfo&& other) noexcept; -+ PendingTrackInfo(PendingTrackInfo&& other); -+ PendingTrackInfo& operator=(PendingTrackInfo&& other); - ~PendingTrackInfo(); - - MediaStreamVideoTrack* track; -diff --git a/third_party/blink/renderer/core/animation/interpolation_value.h b/third_party/blink/renderer/core/animation/interpolation_value.h -index 75c5d35..17ccf02 100644 ---- a/third_party/blink/renderer/core/animation/interpolation_value.h -+++ b/third_party/blink/renderer/core/animation/interpolation_value.h -@@ -27,11 +27,11 @@ - - InterpolationValue(std::nullptr_t) {} - -- InterpolationValue(InterpolationValue&& other) noexcept -+ InterpolationValue(InterpolationValue&& other) - : interpolable_value(std::move(other.interpolable_value)), - non_interpolable_value(std::move(other.non_interpolable_value)) {} - -- void operator=(InterpolationValue&& other) noexcept { -+ void operator=(InterpolationValue&& other) { - interpolable_value = std::move(other.interpolable_value); - non_interpolable_value = std::move(other.non_interpolable_value); - } -diff --git a/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h b/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h -index 39e6c57..87bb431 100644 ---- a/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h -+++ b/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h -@@ -28,7 +28,7 @@ - - PairwiseInterpolationValue(std::nullptr_t) {} - -- PairwiseInterpolationValue(PairwiseInterpolationValue&& other) noexcept -+ PairwiseInterpolationValue(PairwiseInterpolationValue&& other) - : start_interpolable_value(std::move(other.start_interpolable_value)), - end_interpolable_value(std::move(other.end_interpolable_value)), - non_interpolable_value(std::move(other.non_interpolable_value)) {} -diff --git a/third_party/blink/renderer/core/css/css_selector_list.h b/third_party/blink/renderer/core/css/css_selector_list.h -index 4d38b09..51f354b 100644 ---- a/third_party/blink/renderer/core/css/css_selector_list.h -+++ b/third_party/blink/renderer/core/css/css_selector_list.h -@@ -67,8 +67,7 @@ - public: - CSSSelectorList() : selector_array_(nullptr) {} - -- CSSSelectorList(CSSSelectorList&& o) noexcept -- : selector_array_(o.selector_array_) { -+ CSSSelectorList(CSSSelectorList&& o) : selector_array_(o.selector_array_) { - o.selector_array_ = nullptr; - } - -@@ -82,7 +81,7 @@ - bool HasPseudoWhere() const; - bool RequiresExpansion() const; - -- CSSSelectorList& operator=(CSSSelectorList&& o) noexcept { -+ CSSSelectorList& operator=(CSSSelectorList&& o) { - DCHECK(this != &o); - DeleteSelectorsIfNeeded(); - selector_array_ = o.selector_array_; -diff --git a/third_party/blink/renderer/core/display_lock/display_lock_context.cc b/third_party/blink/renderer/core/display_lock/display_lock_context.cc -index 0e6b6cb..79f281a 100644 ---- a/third_party/blink/renderer/core/display_lock/display_lock_context.cc -+++ b/third_party/blink/renderer/core/display_lock/display_lock_context.cc -@@ -1033,7 +1033,7 @@ - : context_(context) {} - - DisplayLockContext::ScopedForcedUpdate::ScopedForcedUpdate( -- ScopedForcedUpdate&& other) noexcept -+ ScopedForcedUpdate&& other) - : context_(other.context_) { - other.context_ = nullptr; - } -diff --git a/third_party/blink/renderer/core/display_lock/display_lock_context.h b/third_party/blink/renderer/core/display_lock/display_lock_context.h -index 1a38b2af..f890b432 100644 ---- a/third_party/blink/renderer/core/display_lock/display_lock_context.h -+++ b/third_party/blink/renderer/core/display_lock/display_lock_context.h -@@ -76,7 +76,7 @@ - DISALLOW_NEW(); - - public: -- ScopedForcedUpdate(ScopedForcedUpdate&&) noexcept; -+ ScopedForcedUpdate(ScopedForcedUpdate&&); - ~ScopedForcedUpdate(); - - private: -diff --git a/third_party/blink/renderer/core/editing/layout_selection.cc b/third_party/blink/renderer/core/editing/layout_selection.cc -index 00040d2..73cfe0f 100644 ---- a/third_party/blink/renderer/core/editing/layout_selection.cc -+++ b/third_party/blink/renderer/core/editing/layout_selection.cc -@@ -178,7 +178,7 @@ - public: - OldSelectedNodes() - : paint_range(MakeGarbageCollected()) {} -- OldSelectedNodes(OldSelectedNodes&& other) noexcept { -+ OldSelectedNodes(OldSelectedNodes&& other) { - paint_range = other.paint_range; - selected_map = std::move(other.selected_map); - } -@@ -205,8 +205,7 @@ - HeapHashSet>&& passed_selected_objects) - : paint_range(passed_paint_range), - selected_objects(std::move(passed_selected_objects)) {} -- NewPaintRangeAndSelectedNodes( -- NewPaintRangeAndSelectedNodes&& other) noexcept { -+ NewPaintRangeAndSelectedNodes(NewPaintRangeAndSelectedNodes&& other) { - paint_range = other.paint_range; - selected_objects = std::move(other.selected_objects); - } -diff --git a/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc b/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc -index f0ac3c4..81f47ab 100644 ---- a/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc -+++ b/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc -@@ -24,7 +24,7 @@ - start_time_(clock_->NowTicks()) {} - - LocalFrameUkmAggregator::ScopedUkmHierarchicalTimer::ScopedUkmHierarchicalTimer( -- ScopedUkmHierarchicalTimer&& other) noexcept -+ ScopedUkmHierarchicalTimer&& other) - : aggregator_(other.aggregator_), - metric_index_(other.metric_index_), - clock_(other.clock_), -diff --git a/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.h b/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.h -index 44c3f87..dc06091 100644 ---- a/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.h -+++ b/third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.h -@@ -195,7 +195,7 @@ - STACK_ALLOCATED(); - - public: -- ScopedUkmHierarchicalTimer(ScopedUkmHierarchicalTimer&&) noexcept; -+ ScopedUkmHierarchicalTimer(ScopedUkmHierarchicalTimer&&); - ~ScopedUkmHierarchicalTimer(); - - private: -diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h -index 2af19ca..498e42e 100644 ---- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h -+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h -@@ -181,7 +181,7 @@ - - public: - ChildList() = default; -- void operator=(ChildList&& other) noexcept { -+ void operator=(ChildList&& other) { - children_ = std::move(other.children_); - } - -diff --git a/third_party/blink/renderer/core/layout/ng/ng_constraint_space.h b/third_party/blink/renderer/core/layout/ng/ng_constraint_space.h -index 8f77b90..833b0d2 100644 ---- a/third_party/blink/renderer/core/layout/ng/ng_constraint_space.h -+++ b/third_party/blink/renderer/core/layout/ng/ng_constraint_space.h -@@ -86,7 +86,7 @@ - else - bfc_offset_ = other.bfc_offset_; - } -- NGConstraintSpace(NGConstraintSpace&& other) noexcept -+ NGConstraintSpace(NGConstraintSpace&& other) - : available_size_(other.available_size_), - exclusion_space_(std::move(other.exclusion_space_)), - bitfields_(other.bitfields_) { -@@ -110,7 +110,7 @@ - bitfields_ = other.bitfields_; - return *this; - } -- NGConstraintSpace& operator=(NGConstraintSpace&& other) noexcept { -+ NGConstraintSpace& operator=(NGConstraintSpace&& other) { - available_size_ = other.available_size_; - if (HasRareData()) - delete rare_data_; -diff --git a/third_party/blink/renderer/core/messaging/blink_cloneable_message.cc b/third_party/blink/renderer/core/messaging/blink_cloneable_message.cc -index b6c8768..7423930 100644 ---- a/third_party/blink/renderer/core/messaging/blink_cloneable_message.cc -+++ b/third_party/blink/renderer/core/messaging/blink_cloneable_message.cc -@@ -9,9 +9,8 @@ - BlinkCloneableMessage::BlinkCloneableMessage() = default; - BlinkCloneableMessage::~BlinkCloneableMessage() = default; - --BlinkCloneableMessage::BlinkCloneableMessage(BlinkCloneableMessage&&) noexcept = -- default; -+BlinkCloneableMessage::BlinkCloneableMessage(BlinkCloneableMessage&&) = default; - BlinkCloneableMessage& BlinkCloneableMessage::operator=( -- BlinkCloneableMessage&&) noexcept = default; -+ BlinkCloneableMessage&&) = default; - - } // namespace blink -diff --git a/third_party/blink/renderer/core/messaging/blink_cloneable_message.h b/third_party/blink/renderer/core/messaging/blink_cloneable_message.h -index 337b0f8..a51e888 100644 ---- a/third_party/blink/renderer/core/messaging/blink_cloneable_message.h -+++ b/third_party/blink/renderer/core/messaging/blink_cloneable_message.h -@@ -21,8 +21,8 @@ - BlinkCloneableMessage(); - ~BlinkCloneableMessage(); - -- BlinkCloneableMessage(BlinkCloneableMessage&&) noexcept; -- BlinkCloneableMessage& operator=(BlinkCloneableMessage&&) noexcept; -+ BlinkCloneableMessage(BlinkCloneableMessage&&); -+ BlinkCloneableMessage& operator=(BlinkCloneableMessage&&); - - scoped_refptr message; - v8_inspector::V8StackTraceId sender_stack_trace_id; -diff --git a/third_party/blink/renderer/core/messaging/blink_transferable_message.cc b/third_party/blink/renderer/core/messaging/blink_transferable_message.cc -index 909ddb0..b5cdfda 100644 ---- a/third_party/blink/renderer/core/messaging/blink_transferable_message.cc -+++ b/third_party/blink/renderer/core/messaging/blink_transferable_message.cc -@@ -16,10 +16,10 @@ - BlinkTransferableMessage::BlinkTransferableMessage() = default; - BlinkTransferableMessage::~BlinkTransferableMessage() = default; - --BlinkTransferableMessage::BlinkTransferableMessage( -- BlinkTransferableMessage&&) noexcept = default; -+BlinkTransferableMessage::BlinkTransferableMessage(BlinkTransferableMessage&&) = -+ default; - BlinkTransferableMessage& BlinkTransferableMessage::operator=( -- BlinkTransferableMessage&&) noexcept = default; -+ BlinkTransferableMessage&&) = default; - - scoped_refptr ToStaticBitmapImage( - const SkBitmap& sk_bitmap) { -diff --git a/third_party/blink/renderer/core/messaging/blink_transferable_message.h b/third_party/blink/renderer/core/messaging/blink_transferable_message.h -index edf4fab..3957bed 100644 ---- a/third_party/blink/renderer/core/messaging/blink_transferable_message.h -+++ b/third_party/blink/renderer/core/messaging/blink_transferable_message.h -@@ -24,8 +24,8 @@ - BlinkTransferableMessage(); - ~BlinkTransferableMessage(); - -- BlinkTransferableMessage(BlinkTransferableMessage&&) noexcept; -- BlinkTransferableMessage& operator=(BlinkTransferableMessage&&) noexcept; -+ BlinkTransferableMessage(BlinkTransferableMessage&&); -+ BlinkTransferableMessage& operator=(BlinkTransferableMessage&&); - - Vector ports; - -diff --git a/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.h b/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.h -index 85b46e1..f050a85 100644 ---- a/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.h -+++ b/third_party/blink/renderer/modules/imagecapture/image_capture_frame_grabber.h -@@ -92,10 +92,10 @@ - std::move(destruction_callback_).Run(std::move(callbacks_)); - } - -- ScopedWebCallbacks(ScopedWebCallbacks&& other) noexcept = default; -+ ScopedWebCallbacks(ScopedWebCallbacks&& other) = default; - ScopedWebCallbacks(const ScopedWebCallbacks& other) = delete; - -- ScopedWebCallbacks& operator=(ScopedWebCallbacks&& other) noexcept = default; -+ ScopedWebCallbacks& operator=(ScopedWebCallbacks&& other) = default; - ScopedWebCallbacks& operator=(const ScopedWebCallbacks& other) = delete; - - std::unique_ptr PassCallbacks() { -diff --git a/third_party/blink/renderer/modules/indexeddb/idb_request.h b/third_party/blink/renderer/modules/indexeddb/idb_request.h -index f85b864..d3f1132 100644 ---- a/third_party/blink/renderer/modules/indexeddb/idb_request.h -+++ b/third_party/blink/renderer/modules/indexeddb/idb_request.h -@@ -110,13 +110,13 @@ - ~AsyncTraceState(); - - // Used to transfer the trace end event state to an IDBRequest. -- AsyncTraceState(AsyncTraceState&& other) noexcept { -+ AsyncTraceState(AsyncTraceState&& other) { - DCHECK(IsEmpty()); - this->trace_event_name_ = other.trace_event_name_; - this->id_ = other.id_; - other.trace_event_name_ = nullptr; - } -- AsyncTraceState& operator=(AsyncTraceState&& rhs) noexcept { -+ AsyncTraceState& operator=(AsyncTraceState&& rhs) { - DCHECK(IsEmpty()); - this->trace_event_name_ = rhs.trace_event_name_; - this->id_ = rhs.id_; -diff --git a/third_party/blink/renderer/modules/indexeddb/idb_request_test.cc b/third_party/blink/renderer/modules/indexeddb/idb_request_test.cc -index 84de726..2d3d4de5 100644 ---- a/third_party/blink/renderer/modules/indexeddb/idb_request_test.cc -+++ b/third_party/blink/renderer/modules/indexeddb/idb_request_test.cc -@@ -434,10 +434,9 @@ - class AsyncTraceStateForTesting : public IDBRequest::AsyncTraceState { - public: - AsyncTraceStateForTesting() : IDBRequest::AsyncTraceState() {} -- AsyncTraceStateForTesting(AsyncTraceStateForTesting&& other) noexcept -+ AsyncTraceStateForTesting(AsyncTraceStateForTesting&& other) - : IDBRequest::AsyncTraceState(std::move(other)) {} -- AsyncTraceStateForTesting& operator=( -- AsyncTraceStateForTesting&& rhs) noexcept { -+ AsyncTraceStateForTesting& operator=(AsyncTraceStateForTesting&& rhs) { - AsyncTraceState::operator=(std::move(rhs)); - return *this; - } -diff --git a/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util.cc b/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util.cc -index 24499bd..3bf00e9 100644 ---- a/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util.cc -+++ b/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util.cc -@@ -134,13 +134,13 @@ - - VideoCaptureSettings::VideoCaptureSettings(const VideoCaptureSettings& other) = - default; --VideoCaptureSettings::VideoCaptureSettings( -- VideoCaptureSettings&& other) noexcept = default; -+VideoCaptureSettings::VideoCaptureSettings(VideoCaptureSettings&& other) = -+ default; - VideoCaptureSettings::~VideoCaptureSettings() = default; - VideoCaptureSettings& VideoCaptureSettings::operator=( - const VideoCaptureSettings& other) = default; - VideoCaptureSettings& VideoCaptureSettings::operator=( -- VideoCaptureSettings&& other) noexcept = default; -+ VideoCaptureSettings&& other) = default; - - AudioCaptureSettings::AudioCaptureSettings() : AudioCaptureSettings("") {} - -@@ -166,10 +166,10 @@ - default; - AudioCaptureSettings& AudioCaptureSettings::operator=( - const AudioCaptureSettings& other) = default; --AudioCaptureSettings::AudioCaptureSettings( -- AudioCaptureSettings&& other) noexcept = default; -+AudioCaptureSettings::AudioCaptureSettings(AudioCaptureSettings&& other) = -+ default; - AudioCaptureSettings& AudioCaptureSettings::operator=( -- AudioCaptureSettings&& other) noexcept = default; -+ AudioCaptureSettings&& other) = default; - - bool GetConstraintValueAsBoolean( - const WebMediaConstraints& constraints, -diff --git a/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.cc b/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.cc -index 96992217..67c8bab 100644 ---- a/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.cc -+++ b/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.cc -@@ -529,9 +529,9 @@ - facing_mode(facing_mode) {} - - VideoInputDeviceCapabilities::VideoInputDeviceCapabilities( -- VideoInputDeviceCapabilities&& other) noexcept = default; -+ VideoInputDeviceCapabilities&& other) = default; - VideoInputDeviceCapabilities& VideoInputDeviceCapabilities::operator=( -- VideoInputDeviceCapabilities&& other) noexcept = default; -+ VideoInputDeviceCapabilities&& other) = default; - - VideoInputDeviceCapabilities::~VideoInputDeviceCapabilities() = default; - -@@ -557,10 +557,10 @@ - - VideoDeviceCaptureCapabilities::VideoDeviceCaptureCapabilities() = default; - VideoDeviceCaptureCapabilities::VideoDeviceCaptureCapabilities( -- VideoDeviceCaptureCapabilities&& other) noexcept = default; -+ VideoDeviceCaptureCapabilities&& other) = default; - VideoDeviceCaptureCapabilities::~VideoDeviceCaptureCapabilities() = default; - VideoDeviceCaptureCapabilities& VideoDeviceCaptureCapabilities::operator=( -- VideoDeviceCaptureCapabilities&& other) noexcept = default; -+ VideoDeviceCaptureCapabilities&& other) = default; - - VideoCaptureSettings SelectSettingsVideoDeviceCapture( - const VideoDeviceCaptureCapabilities& capabilities, -diff --git a/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h b/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h -index 66ae103..94d8ed9 100644 ---- a/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h -+++ b/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h -@@ -34,9 +34,8 @@ - Vector formats, - media::VideoFacingMode facing_mode); - VideoInputDeviceCapabilities(); -- VideoInputDeviceCapabilities(VideoInputDeviceCapabilities&& other) noexcept; -- VideoInputDeviceCapabilities& operator=( -- VideoInputDeviceCapabilities&& other) noexcept; -+ VideoInputDeviceCapabilities(VideoInputDeviceCapabilities&& other); -+ VideoInputDeviceCapabilities& operator=(VideoInputDeviceCapabilities&& other); - ~VideoInputDeviceCapabilities(); - - String device_id; -@@ -47,11 +46,10 @@ - - struct MODULES_EXPORT VideoDeviceCaptureCapabilities { - VideoDeviceCaptureCapabilities(); -- VideoDeviceCaptureCapabilities( -- VideoDeviceCaptureCapabilities&& other) noexcept; -+ VideoDeviceCaptureCapabilities(VideoDeviceCaptureCapabilities&& other); - ~VideoDeviceCaptureCapabilities(); - VideoDeviceCaptureCapabilities& operator=( -- VideoDeviceCaptureCapabilities&& other) noexcept; -+ VideoDeviceCaptureCapabilities&& other); - - // Each capabilities field is independent of each other. - // TODO(crbug.com/704136): Replace VideoInputDeviceCapabilities in the -diff --git a/third_party/blink/renderer/modules/mediastream/media_stream_video_source.cc b/third_party/blink/renderer/modules/mediastream/media_stream_video_source.cc -index 7651e47..99759c1 100644 ---- a/third_party/blink/renderer/modules/mediastream/media_stream_video_source.cc -+++ b/third_party/blink/renderer/modules/mediastream/media_stream_video_source.cc -@@ -461,10 +461,10 @@ - callback(callback) {} - - MediaStreamVideoSource::PendingTrackInfo::PendingTrackInfo( -- PendingTrackInfo&& other) noexcept = default; -+ PendingTrackInfo&& other) = default; - MediaStreamVideoSource::PendingTrackInfo& - MediaStreamVideoSource::PendingTrackInfo::operator=( -- MediaStreamVideoSource::PendingTrackInfo&& other) noexcept = default; -+ MediaStreamVideoSource::PendingTrackInfo&& other) = default; - - MediaStreamVideoSource::PendingTrackInfo::~PendingTrackInfo() {} - -diff --git a/third_party/blink/renderer/platform/bindings/dom_data_store.h b/third_party/blink/renderer/platform/bindings/dom_data_store.h -index d660b67..0660dd18 100644 ---- a/third_party/blink/renderer/platform/bindings/dom_data_store.h -+++ b/third_party/blink/renderer/platform/bindings/dom_data_store.h -@@ -230,12 +230,11 @@ - : TraceWrapperV8Reference(isolate, handle) {} - - // Move support without write barrier. -- DOMWorldWrapperReference(DOMWorldWrapperReference&& other) noexcept -+ DOMWorldWrapperReference(DOMWorldWrapperReference&& other) - : TraceWrapperV8Reference() { - handle_ = std::move(other.handle_); - } -- DOMWorldWrapperReference& operator=( -- DOMWorldWrapperReference&& rhs) noexcept { -+ DOMWorldWrapperReference& operator=(DOMWorldWrapperReference&& rhs) { - handle_ = std::move(rhs.handle_); - return *this; - } -diff --git a/third_party/blink/renderer/platform/exported/web_string.cc b/third_party/blink/renderer/platform/exported/web_string.cc -index 71d4c07..fbe4828 100644 ---- a/third_party/blink/renderer/platform/exported/web_string.cc -+++ b/third_party/blink/renderer/platform/exported/web_string.cc -@@ -51,9 +51,9 @@ - WebString::~WebString() = default; - WebString::WebString() = default; - WebString::WebString(const WebString&) = default; --WebString::WebString(WebString&&) noexcept = default; -+WebString::WebString(WebString&&) = default; - WebString& WebString::operator=(const WebString&) = default; --WebString& WebString::operator=(WebString&&) noexcept = default; -+WebString& WebString::operator=(WebString&&) = default; - - WebString::WebString(const WebUChar* data, size_t len) - : impl_(StringImpl::Create8BitIfPossible(data, len)) {} -diff --git a/third_party/blink/renderer/platform/graphics/contiguous_container.cc b/third_party/blink/renderer/platform/graphics/contiguous_container.cc -index fd01c00..19cb6f2 100644 ---- a/third_party/blink/renderer/platform/graphics/contiguous_container.cc -+++ b/third_party/blink/renderer/platform/graphics/contiguous_container.cc -@@ -69,7 +69,7 @@ - : end_index_(0), max_object_size_(max_object_size) {} - - ContiguousContainerBase::ContiguousContainerBase( -- ContiguousContainerBase&& source) noexcept -+ ContiguousContainerBase&& source) - : ContiguousContainerBase(source.max_object_size_) { - Swap(source); - } -@@ -77,7 +77,7 @@ - ContiguousContainerBase::~ContiguousContainerBase() = default; - - ContiguousContainerBase& ContiguousContainerBase::operator=( -- ContiguousContainerBase&& source) noexcept { -+ ContiguousContainerBase&& source) { - Swap(source); - return *this; - } -diff --git a/third_party/blink/renderer/platform/graphics/contiguous_container.h b/third_party/blink/renderer/platform/graphics/contiguous_container.h -index 867e59c..3eee558 100644 ---- a/third_party/blink/renderer/platform/graphics/contiguous_container.h -+++ b/third_party/blink/renderer/platform/graphics/contiguous_container.h -@@ -42,10 +42,10 @@ - - protected: - explicit ContiguousContainerBase(size_t max_object_size); -- ContiguousContainerBase(ContiguousContainerBase&&) noexcept; -+ ContiguousContainerBase(ContiguousContainerBase&&); - ~ContiguousContainerBase(); - -- ContiguousContainerBase& operator=(ContiguousContainerBase&&) noexcept; -+ ContiguousContainerBase& operator=(ContiguousContainerBase&&); - - size_t size() const { return elements_.size(); } - bool IsEmpty() const { return !size(); } -@@ -147,7 +147,7 @@ - WTF_HEAP_PROFILER_TYPE_NAME(BaseElementType)); - } - -- ContiguousContainer(ContiguousContainer&& source) noexcept -+ ContiguousContainer(ContiguousContainer&& source) - : ContiguousContainerBase(std::move(source)) {} - - ~ContiguousContainer() { -@@ -157,7 +157,7 @@ - } - } - -- ContiguousContainer& operator=(ContiguousContainer&& source) noexcept { -+ ContiguousContainer& operator=(ContiguousContainer&& source) { - // Must clear in the derived class to ensure that element destructors - // care called. - Clear(); -diff --git a/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc b/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc -index ad10c54..4edbf7f 100644 ---- a/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc -+++ b/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.cc -@@ -247,9 +247,9 @@ - } - - ImageLayerBridge::RegisteredBitmap::RegisteredBitmap() = default; --ImageLayerBridge::RegisteredBitmap::RegisteredBitmap( -- RegisteredBitmap&& other) noexcept = default; -+ImageLayerBridge::RegisteredBitmap::RegisteredBitmap(RegisteredBitmap&& other) = -+ default; - ImageLayerBridge::RegisteredBitmap& ImageLayerBridge::RegisteredBitmap:: --operator=(RegisteredBitmap&& other) noexcept = default; -+operator=(RegisteredBitmap&& other) = default; - - } // namespace blink -diff --git a/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.h b/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.h -index bea81dfb..b6879f9 100644 ---- a/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.h -+++ b/third_party/blink/renderer/platform/graphics/gpu/image_layer_bridge.h -@@ -65,8 +65,8 @@ - // only with software compositing. - struct RegisteredBitmap { - RegisteredBitmap(); -- RegisteredBitmap(RegisteredBitmap&& other) noexcept; -- RegisteredBitmap& operator=(RegisteredBitmap&& other) noexcept; -+ RegisteredBitmap(RegisteredBitmap&& other); -+ RegisteredBitmap& operator=(RegisteredBitmap&& other); - - scoped_refptr bitmap; - cc::SharedBitmapIdRegistration registration; -diff --git a/third_party/blink/renderer/platform/graphics/paint/display_item_list.h b/third_party/blink/renderer/platform/graphics/paint/display_item_list.h -index cd3ed2f..9ee2571 100644 ---- a/third_party/blink/renderer/platform/graphics/paint/display_item_list.h -+++ b/third_party/blink/renderer/platform/graphics/paint/display_item_list.h -@@ -28,10 +28,10 @@ - public: - DisplayItemList(size_t initial_size_bytes) - : ContiguousContainer(kMaximumDisplayItemSize, initial_size_bytes) {} -- DisplayItemList(DisplayItemList&& source) noexcept -+ DisplayItemList(DisplayItemList&& source) - : ContiguousContainer(std::move(source)) {} - -- DisplayItemList& operator=(DisplayItemList&& source) noexcept { -+ DisplayItemList& operator=(DisplayItemList&& source) { - ContiguousContainer::operator=(std::move(source)); - return *this; - } -diff --git a/third_party/blink/renderer/platform/heap/heap_test.cc b/third_party/blink/renderer/platform/heap/heap_test.cc -index dad0ca0..e94cbc95 100644 ---- a/third_party/blink/renderer/platform/heap/heap_test.cc -+++ b/third_party/blink/renderer/platform/heap/heap_test.cc -@@ -145,7 +145,7 @@ - } - KeyWithCopyingMoveConstructor(const KeyWithCopyingMoveConstructor&) = default; - // The move constructor delegates to the copy constructor intentionally. -- KeyWithCopyingMoveConstructor(KeyWithCopyingMoveConstructor&& x) noexcept -+ KeyWithCopyingMoveConstructor(KeyWithCopyingMoveConstructor&& x) - : KeyWithCopyingMoveConstructor(x) {} - KeyWithCopyingMoveConstructor& operator=( - const KeyWithCopyingMoveConstructor&) = default; -diff --git a/third_party/blink/renderer/platform/image-decoders/segment_stream.cc b/third_party/blink/renderer/platform/image-decoders/segment_stream.cc -index 4024f9c..5a98701 100644 ---- a/third_party/blink/renderer/platform/image-decoders/segment_stream.cc -+++ b/third_party/blink/renderer/platform/image-decoders/segment_stream.cc -@@ -10,10 +10,10 @@ - - SegmentStream::SegmentStream() = default; - --SegmentStream::SegmentStream(SegmentStream&& rhs) noexcept -+SegmentStream::SegmentStream(SegmentStream&& rhs) - : reader_(std::move(rhs.reader_)), position_(rhs.position_) {} - --SegmentStream& SegmentStream::operator=(SegmentStream&& rhs) noexcept { -+SegmentStream& SegmentStream::operator=(SegmentStream&& rhs) { - reader_ = std::move(rhs.reader_); - position_ = rhs.position_; - -diff --git a/third_party/blink/renderer/platform/image-decoders/segment_stream.h b/third_party/blink/renderer/platform/image-decoders/segment_stream.h -index f49f551..fa1ccf2 100644 ---- a/third_party/blink/renderer/platform/image-decoders/segment_stream.h -+++ b/third_party/blink/renderer/platform/image-decoders/segment_stream.h -@@ -19,8 +19,8 @@ - SegmentStream(); - SegmentStream(const SegmentStream&) = delete; - SegmentStream& operator=(const SegmentStream&) = delete; -- SegmentStream(SegmentStream&&) noexcept; -- SegmentStream& operator=(SegmentStream&&) noexcept; -+ SegmentStream(SegmentStream&&); -+ SegmentStream& operator=(SegmentStream&&); - - ~SegmentStream() override; - -diff --git a/third_party/blink/renderer/platform/mojo/revocable_interface_ptr.h b/third_party/blink/renderer/platform/mojo/revocable_interface_ptr.h -index 555be28..34bad3f 100644 ---- a/third_party/blink/renderer/platform/mojo/revocable_interface_ptr.h -+++ b/third_party/blink/renderer/platform/mojo/revocable_interface_ptr.h -@@ -41,7 +41,7 @@ - RevocableInterfacePtr(std::nullptr_t) {} - - // Takes over the binding of another RevocableInterfacePtr. -- RevocableInterfacePtr(RevocableInterfacePtr&& other) noexcept { -+ RevocableInterfacePtr(RevocableInterfacePtr&& other) { - interface_ptr_ = std::move(other.interface_ptr_); - SetInvalidator(other.invalidator_.get()); - // Reset the other interface ptr to remove it as an observer of the -@@ -58,7 +58,7 @@ - - // Takes over the binding of another RevocableInterfacePtr, and closes any - // message pipe already bound to this pointer. -- RevocableInterfacePtr& operator=(RevocableInterfacePtr&& other) noexcept { -+ RevocableInterfacePtr& operator=(RevocableInterfacePtr&& other) { - reset(); - interface_ptr_ = std::move(other.interface_ptr_); - SetInvalidator(other.invalidator_.get()); -diff --git a/third_party/blink/renderer/platform/network/encoded_form_data.cc b/third_party/blink/renderer/platform/network/encoded_form_data.cc -index bc4ec14..1b660e6 100644 ---- a/third_party/blink/renderer/platform/network/encoded_form_data.cc -+++ b/third_party/blink/renderer/platform/network/encoded_form_data.cc -@@ -61,11 +61,10 @@ - : type_(kDataPipe), data_pipe_getter_(std::move(data_pipe_getter)) {} - - FormDataElement::FormDataElement(const FormDataElement&) = default; --FormDataElement::FormDataElement(FormDataElement&&) noexcept = default; -+FormDataElement::FormDataElement(FormDataElement&&) = default; - FormDataElement::~FormDataElement() = default; - FormDataElement& FormDataElement::operator=(const FormDataElement&) = default; --FormDataElement& FormDataElement::operator=(FormDataElement&&) noexcept = -- default; -+FormDataElement& FormDataElement::operator=(FormDataElement&&) = default; - - bool operator==(const FormDataElement& a, const FormDataElement& b) { - if (&a == &b) -diff --git a/third_party/blink/renderer/platform/network/encoded_form_data.h b/third_party/blink/renderer/platform/network/encoded_form_data.h -index 48f84c8..865f664 100644 ---- a/third_party/blink/renderer/platform/network/encoded_form_data.h -+++ b/third_party/blink/renderer/platform/network/encoded_form_data.h -@@ -61,12 +61,12 @@ - explicit FormDataElement(scoped_refptr); - - FormDataElement(const FormDataElement&); -- FormDataElement(FormDataElement&&) noexcept; -+ FormDataElement(FormDataElement&&); - - ~FormDataElement(); - - FormDataElement& operator=(const FormDataElement&); -- FormDataElement& operator=(FormDataElement&&) noexcept; -+ FormDataElement& operator=(FormDataElement&&); - - bool IsSafeToSendToAnotherThread() const; - -diff --git a/third_party/blink/renderer/platform/scheduler/common/frame_or_worker_scheduler.cc b/third_party/blink/renderer/platform/scheduler/common/frame_or_worker_scheduler.cc -index ebe99ff..e971856 100644 ---- a/third_party/blink/renderer/platform/scheduler/common/frame_or_worker_scheduler.cc -+++ b/third_party/blink/renderer/platform/scheduler/common/frame_or_worker_scheduler.cc -@@ -28,15 +28,14 @@ - } - - FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle:: -- SchedulingAffectingFeatureHandle( -- SchedulingAffectingFeatureHandle&& other) noexcept -+ SchedulingAffectingFeatureHandle(SchedulingAffectingFeatureHandle&& other) - : feature_(other.feature_), scheduler_(std::move(other.scheduler_)) { - other.scheduler_ = nullptr; - } - - FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle& - FrameOrWorkerScheduler::SchedulingAffectingFeatureHandle::operator=( -- SchedulingAffectingFeatureHandle&& other) noexcept { -+ SchedulingAffectingFeatureHandle&& other) { - feature_ = other.feature_; - policy_ = std::move(other.policy_); - scheduler_ = std::move(other.scheduler_); -diff --git a/third_party/blink/renderer/platform/scheduler/common/post_cancellable_task.cc b/third_party/blink/renderer/platform/scheduler/common/post_cancellable_task.cc -index 2c84d70..fad56ee1 100644 ---- a/third_party/blink/renderer/platform/scheduler/common/post_cancellable_task.cc -+++ b/third_party/blink/renderer/platform/scheduler/common/post_cancellable_task.cc -@@ -103,9 +103,9 @@ - Cancel(); - } - --TaskHandle::TaskHandle(TaskHandle&&) noexcept = default; -+TaskHandle::TaskHandle(TaskHandle&&) = default; - --TaskHandle& TaskHandle::operator=(TaskHandle&& other) noexcept { -+TaskHandle& TaskHandle::operator=(TaskHandle&& other) { - TaskHandle tmp(std::move(other)); - runner_.swap(tmp.runner_); - return *this; -diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/web_scoped_virtual_time_pauser.cc b/third_party/blink/renderer/platform/scheduler/main_thread/web_scoped_virtual_time_pauser.cc -index f55730a..b64ec9d 100644 ---- a/third_party/blink/renderer/platform/scheduler/main_thread/web_scoped_virtual_time_pauser.cc -+++ b/third_party/blink/renderer/platform/scheduler/main_thread/web_scoped_virtual_time_pauser.cc -@@ -28,7 +28,7 @@ - } - - WebScopedVirtualTimePauser::WebScopedVirtualTimePauser( -- WebScopedVirtualTimePauser&& other) noexcept { -+ WebScopedVirtualTimePauser&& other) { - virtual_time_when_paused_ = other.virtual_time_when_paused_; - paused_ = other.paused_; - duration_ = other.duration_; -@@ -39,7 +39,7 @@ - } - - WebScopedVirtualTimePauser& WebScopedVirtualTimePauser::operator=( -- WebScopedVirtualTimePauser&& other) noexcept { -+ WebScopedVirtualTimePauser&& other) { - if (scheduler_ && paused_) - DecrementVirtualTimePauseCount(); - virtual_time_when_paused_ = other.virtual_time_when_paused_; -diff --git a/third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h b/third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h -index 56915ee..3fdb8cf 100644 ---- a/third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h -+++ b/third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h -@@ -57,12 +57,11 @@ - - public: - SchedulingAffectingFeatureHandle() = default; -- SchedulingAffectingFeatureHandle( -- SchedulingAffectingFeatureHandle&&) noexcept; -+ SchedulingAffectingFeatureHandle(SchedulingAffectingFeatureHandle&&); - inline ~SchedulingAffectingFeatureHandle() { reset(); } - - SchedulingAffectingFeatureHandle& operator=( -- SchedulingAffectingFeatureHandle&&) noexcept; -+ SchedulingAffectingFeatureHandle&&); - - inline void reset() { - if (scheduler_) -diff --git a/third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h b/third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h -index 38cbf63..ae66c73 100644 ---- a/third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h -+++ b/third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h -@@ -28,8 +28,8 @@ - TaskHandle(); - ~TaskHandle(); - -- TaskHandle(TaskHandle&&) noexcept; -- TaskHandle& operator=(TaskHandle&&) noexcept; -+ TaskHandle(TaskHandle&&); -+ TaskHandle& operator=(TaskHandle&&); - - // Returns true if the task will run later. Returns false if the task is - // cancelled or the task is run already. -diff --git a/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc b/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc -index 2e9a9d1..c9d777e7 100644 ---- a/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc -+++ b/third_party/blink/renderer/platform/weborigin/origin_access_entry.cc -@@ -59,8 +59,7 @@ - network::mojom::CorsPortMatchMode::kAllowOnlySpecifiedPort, - priority) {} - --OriginAccessEntry::OriginAccessEntry(OriginAccessEntry&& from) noexcept = -- default; -+OriginAccessEntry::OriginAccessEntry(OriginAccessEntry&& from) = default; - - network::cors::OriginAccessEntry::MatchResult OriginAccessEntry::MatchesOrigin( - const SecurityOrigin& origin) const { -diff --git a/third_party/blink/renderer/platform/weborigin/origin_access_entry.h b/third_party/blink/renderer/platform/weborigin/origin_access_entry.h -index b3e5674..5113a40 100644 ---- a/third_party/blink/renderer/platform/weborigin/origin_access_entry.h -+++ b/third_party/blink/renderer/platform/weborigin/origin_access_entry.h -@@ -58,7 +58,7 @@ - network::mojom::CorsDomainMatchMode, - network::mojom::CorsOriginAccessMatchPriority priority = - network::mojom::CorsOriginAccessMatchPriority::kDefaultPriority); -- OriginAccessEntry(OriginAccessEntry&& from) noexcept; -+ OriginAccessEntry(OriginAccessEntry&& from); - - network::cors::OriginAccessEntry::MatchResult MatchesOrigin( - const SecurityOrigin&) const; -diff --git a/third_party/blink/renderer/platform/wtf/deque.h b/third_party/blink/renderer/platform/wtf/deque.h -index c6fe1b9..4a98ffb 100644 ---- a/third_party/blink/renderer/platform/wtf/deque.h -+++ b/third_party/blink/renderer/platform/wtf/deque.h -@@ -64,8 +64,8 @@ class Deque { - Deque(); - Deque(const Deque&); - Deque& operator=(const Deque&); -- Deque(Deque&&) noexcept; -- Deque& operator=(Deque&&) noexcept; -+ Deque(Deque&&); -+ Deque& operator=(Deque&&); - ~Deque(); - - void FinalizeGarbageCollectedObject() { NOTREACHED(); } -@@ -343,14 +343,14 @@ - } - - template --inline Deque::Deque(Deque&& other) noexcept -+inline Deque::Deque(Deque&& other) - : start_(0), end_(0) { - Swap(other); - } - - template - inline Deque& --Deque::operator=(Deque&& other) noexcept { -+Deque::operator=(Deque&& other) { - Swap(other); - return *this; - } -diff --git a/third_party/blink/renderer/platform/wtf/functional.h b/third_party/blink/renderer/platform/wtf/functional.h -index 2c5aeea..5e4b373 100644 ---- a/third_party/blink/renderer/platform/wtf/functional.h -+++ b/third_party/blink/renderer/platform/wtf/functional.h -@@ -117,8 +117,7 @@ - class PassedWrapper final { - public: - explicit PassedWrapper(T&& scoper) : scoper_(std::move(scoper)) {} -- PassedWrapper(PassedWrapper&& other) noexcept -- : scoper_(std::move(other.scoper_)) {} -+ PassedWrapper(PassedWrapper&& other) : scoper_(std::move(other.scoper_)) {} - T MoveOut() const { return std::move(scoper_); } - - private: -@@ -319,9 +318,8 @@ - CrossThreadFunction(const CrossThreadFunction&) = delete; - CrossThreadFunction& operator=(const CrossThreadFunction&) = delete; - -- CrossThreadFunction(CrossThreadFunction&& other) noexcept = default; -- CrossThreadFunction& operator=(CrossThreadFunction&& other) noexcept = -- default; -+ CrossThreadFunction(CrossThreadFunction&& other) = default; -+ CrossThreadFunction& operator=(CrossThreadFunction&& other) = default; - - R Run(Args... args) const & { - return callback_.Run(std::forward(args)...); -@@ -356,9 +354,8 @@ - CrossThreadOnceFunction(const CrossThreadOnceFunction&) = delete; - CrossThreadOnceFunction& operator=(const CrossThreadOnceFunction&) = delete; - -- CrossThreadOnceFunction(CrossThreadOnceFunction&& other) noexcept = default; -- CrossThreadOnceFunction& operator=(CrossThreadOnceFunction&& other) noexcept = -- default; -+ CrossThreadOnceFunction(CrossThreadOnceFunction&& other) = default; -+ CrossThreadOnceFunction& operator=(CrossThreadOnceFunction&& other) = default; - - R Run(Args... args) && { - return std::move(callback_).Run(std::forward(args)...); -diff --git a/third_party/blink/renderer/platform/wtf/hash_map.h b/third_party/blink/renderer/platform/wtf/hash_map.h -index 8a002a8..46b39e0 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_map.h -+++ b/third_party/blink/renderer/platform/wtf/hash_map.h -@@ -106,8 +106,8 @@ - #endif - HashMap(const HashMap&) = default; - HashMap& operator=(const HashMap&) = default; -- HashMap(HashMap&&) noexcept = default; -- HashMap& operator=(HashMap&&) noexcept = default; -+ HashMap(HashMap&&) = default; -+ HashMap& operator=(HashMap&&) = default; - - // For example, HashMap({{1, 11}, {2, 22}, {3, 33}}) will give you - // a HashMap containing a mapping {1 -> 11, 2 -> 22, 3 -> 33}. -diff --git a/third_party/blink/renderer/platform/wtf/hash_set.h b/third_party/blink/renderer/platform/wtf/hash_set.h -index c79e45f1..d7cdeed 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_set.h -+++ b/third_party/blink/renderer/platform/wtf/hash_set.h -@@ -74,8 +74,8 @@ - } - HashSet(const HashSet&) = default; - HashSet& operator=(const HashSet&) = default; -- HashSet(HashSet&&) noexcept = default; -- HashSet& operator=(HashSet&&) noexcept = default; -+ HashSet(HashSet&&) = default; -+ HashSet& operator=(HashSet&&) = default; - - HashSet(std::initializer_list elements); - HashSet& operator=(std::initializer_list elements); -diff --git a/third_party/blink/renderer/platform/wtf/hash_table.h b/third_party/blink/renderer/platform/wtf/hash_table.h -index 373280f..52483ec5 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_table.h -+++ b/third_party/blink/renderer/platform/wtf/hash_table.h -@@ -747,10 +747,10 @@ - } - - HashTable(const HashTable&); -- HashTable(HashTable&&) noexcept; -+ HashTable(HashTable&&); - void swap(HashTable&); - HashTable& operator=(const HashTable&); -- HashTable& operator=(HashTable&&) noexcept; -+ HashTable& operator=(HashTable&&); - - // When the hash table is empty, just return the same iterator for end as - // for begin. This is more efficient because we don't have to skip all the -@@ -1929,7 +1929,7 @@ - typename KeyTraits, - typename Allocator> - HashTable:: -- HashTable(HashTable&& other) noexcept -+ HashTable(HashTable&& other) - : table_(nullptr), - table_size_(0), - key_count_(0), -@@ -2008,7 +2008,7 @@ - typename Allocator> - HashTable& - HashTable:: --operator=(HashTable&& other) noexcept { -+operator=(HashTable&& other) { - swap(other); - return *this; - } -diff --git a/third_party/blink/renderer/platform/wtf/linked_hash_set.h b/third_party/blink/renderer/platform/wtf/linked_hash_set.h -index 79c3d76d..71ef37a 100644 ---- a/third_party/blink/renderer/platform/wtf/linked_hash_set.h -+++ b/third_party/blink/renderer/platform/wtf/linked_hash_set.h -@@ -121,7 +121,7 @@ - LinkedHashSetNodeBase(const LinkedHashSetNodeBase& other) - : prev_(nullptr), next_(nullptr) {} - -- LinkedHashSetNodeBase(LinkedHashSetNodeBase&& other) noexcept -+ LinkedHashSetNodeBase(LinkedHashSetNodeBase&& other) - : prev_(other.prev_), next_(other.next_) { - other.prev_ = nullptr; - other.next_ = nullptr; -@@ -151,7 +151,7 @@ - LinkedHashSetNodeBase* next) - : LinkedHashSetNodeBase(prev, next), value_(std::move(value)) {} - -- LinkedHashSetNode(LinkedHashSetNode&& other) noexcept -+ LinkedHashSetNode(LinkedHashSetNode&& other) - : LinkedHashSetNodeBase(std::move(other)), - value_(std::move(other.value_)) {} - -@@ -214,9 +214,9 @@ - - LinkedHashSet(); - LinkedHashSet(const LinkedHashSet&); -- LinkedHashSet(LinkedHashSet&&) noexcept; -+ LinkedHashSet(LinkedHashSet&&); - LinkedHashSet& operator=(const LinkedHashSet&); -- LinkedHashSet& operator=(LinkedHashSet&&) noexcept; -+ LinkedHashSet& operator=(LinkedHashSet&&); - - // Needs finalization. The anchor needs to unlink itself from the chain. - ~LinkedHashSet(); -@@ -748,7 +748,7 @@ - } - - template --inline LinkedHashSet::LinkedHashSet(LinkedHashSet&& other) noexcept -+inline LinkedHashSet::LinkedHashSet(LinkedHashSet&& other) - : anchor_() { - Swap(other); - } -@@ -763,7 +763,7 @@ - - template - inline LinkedHashSet& LinkedHashSet::operator=( -- LinkedHashSet&& other) noexcept { -+ LinkedHashSet&& other) { - Swap(other); - return *this; - } -diff --git a/third_party/blink/renderer/platform/wtf/list_hash_set.h b/third_party/blink/renderer/platform/wtf/list_hash_set.h -index ead6a87..78bd279 100644 ---- a/third_party/blink/renderer/platform/wtf/list_hash_set.h -+++ b/third_party/blink/renderer/platform/wtf/list_hash_set.h -@@ -145,9 +145,9 @@ class ListHashSet { - - ListHashSet(); - ListHashSet(const ListHashSet&); -- ListHashSet(ListHashSet&&) noexcept; -+ ListHashSet(ListHashSet&&); - ListHashSet& operator=(const ListHashSet&); -- ListHashSet& operator=(ListHashSet&&) noexcept; -+ ListHashSet& operator=(ListHashSet&&); - ~ListHashSet(); - - void Swap(ListHashSet&); -@@ -780,8 +780,7 @@ - } - - template --inline ListHashSet::ListHashSet( -- ListHashSet&& other) noexcept -+inline ListHashSet::ListHashSet(ListHashSet&& other) - : head_(nullptr), tail_(nullptr) { - Swap(other); - } -@@ -796,7 +795,7 @@ - - template - inline ListHashSet& --ListHashSet::operator=(ListHashSet&& other) noexcept { -+ListHashSet::operator=(ListHashSet&& other) { - Swap(other); - return *this; - } -diff --git a/third_party/blink/renderer/platform/wtf/type_traits_test.cc b/third_party/blink/renderer/platform/wtf/type_traits_test.cc -index 0930b73..1b45d55 100644 ---- a/third_party/blink/renderer/platform/wtf/type_traits_test.cc -+++ b/third_party/blink/renderer/platform/wtf/type_traits_test.cc -@@ -158,7 +158,7 @@ - STACK_ALLOCATED(); - - public: -- CopyAssignmentDeleted& operator=(CopyAssignmentDeleted&&) noexcept; -+ CopyAssignmentDeleted& operator=(CopyAssignmentDeleted&&); - - private: - CopyAssignmentDeleted& operator=(const CopyAssignmentDeleted&) = delete; -@@ -173,7 +173,7 @@ - STACK_ALLOCATED(); - - public: -- CopyAssignmentPrivate& operator=(CopyAssignmentPrivate&&) noexcept; -+ CopyAssignmentPrivate& operator=(CopyAssignmentPrivate&&); - - private: - CopyAssignmentPrivate& operator=(const CopyAssignmentPrivate&); -@@ -188,7 +188,7 @@ - STACK_ALLOCATED(); - - public: -- CopyAssignmentUndeclared& operator=(CopyAssignmentUndeclared&&) noexcept; -+ CopyAssignmentUndeclared& operator=(CopyAssignmentUndeclared&&); - }; - - static_assert(!std::is_copy_assignable::value, -diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h -index 3f44cd2..ee7c89a 100644 ---- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h -+++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h -@@ -68,7 +68,7 @@ - deleter_(deleter), - deleter_info_(deleter_info) {} - // Move constructor -- DataHandle(DataHandle&& other) noexcept { *this = std::move(other); } -+ DataHandle(DataHandle&& other) { *this = std::move(other); } - ~DataHandle() { - if (!data_) - return; -diff --git a/third_party/blink/renderer/platform/wtf/vector.h b/third_party/blink/renderer/platform/wtf/vector.h -index 2783c2b..43a27f7 100644 ---- a/third_party/blink/renderer/platform/wtf/vector.h -+++ b/third_party/blink/renderer/platform/wtf/vector.h -@@ -1018,8 +1018,8 @@ - Vector& operator=(const Vector&); - - // Moving. -- Vector(Vector&&) noexcept; -- Vector& operator=(Vector&&) noexcept; -+ Vector(Vector&&); -+ Vector& operator=(Vector&&); - - // Construct with an initializer list. You can do e.g. - // Vector v({1, 2, 3}); -@@ -1459,7 +1459,7 @@ - - template - Vector::Vector( -- Vector&& other) noexcept { -+ Vector&& other) { - size_ = 0; - // It's a little weird to implement a move constructor using swap but this - // way we don't have to add a move constructor to VectorBuffer. -@@ -1468,7 +1468,7 @@ - - template - Vector& Vector:: --operator=(Vector&& other) noexcept { -+operator=(Vector&& other) { - swap(other); - return *this; - } -diff --git a/third_party/blink/renderer/platform/wtf/vector_test.cc b/third_party/blink/renderer/platform/wtf/vector_test.cc -index aa8a138..788cc2bb 100644 ---- a/third_party/blink/renderer/platform/wtf/vector_test.cc -+++ b/third_party/blink/renderer/platform/wtf/vector_test.cc -@@ -420,8 +420,8 @@ - class MojoMoveOnlyType final { - public: - MojoMoveOnlyType(); -- MojoMoveOnlyType(MojoMoveOnlyType&&) noexcept; -- MojoMoveOnlyType& operator=(MojoMoveOnlyType&&) noexcept; -+ MojoMoveOnlyType(MojoMoveOnlyType&&); -+ MojoMoveOnlyType& operator=(MojoMoveOnlyType&&); - ~MojoMoveOnlyType(); - - private: -diff --git a/third_party/blink/renderer/platform/wtf/wtf_test_helper.h b/third_party/blink/renderer/platform/wtf/wtf_test_helper.h -index e797445..8f31365 100644 ---- a/third_party/blink/renderer/platform/wtf/wtf_test_helper.h -+++ b/third_party/blink/renderer/platform/wtf/wtf_test_helper.h -@@ -36,9 +36,9 @@ - public: - explicit MoveOnly(int i = 0) : i_(i) {} - -- MoveOnly(MoveOnly&& other) noexcept : i_(other.i_) { other.i_ = 0; } -+ MoveOnly(MoveOnly&& other) : i_(other.i_) { other.i_ = 0; } - -- MoveOnly& operator=(MoveOnly&& other) noexcept { -+ MoveOnly& operator=(MoveOnly&& other) { - if (this != &other) { - i_ = other.i_; - other.i_ = 0; -@@ -62,12 +62,12 @@ - - explicit MoveOnlyHashValue(int value = kEmpty, int id = 0) - : value_(value), id_(id) {} -- MoveOnlyHashValue(MoveOnlyHashValue&& other) noexcept -+ MoveOnlyHashValue(MoveOnlyHashValue&& other) - : value_(other.value_), id_(other.id_) { - other.value_ = kMovedOut; - other.id_ = 0; - } -- MoveOnlyHashValue& operator=(MoveOnlyHashValue&& other) noexcept { -+ MoveOnlyHashValue& operator=(MoveOnlyHashValue&& other) { - value_ = other.value_; - id_ = other.id_; - other.value_ = kMovedOut; diff --git a/srcpkgs/electron7/files/patches/chromium-79-gcc-ambiguous-nodestructor.patch b/srcpkgs/electron7/files/patches/chromium-79-gcc-ambiguous-nodestructor.patch deleted file mode 100644 index d43a091b971..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-79-gcc-ambiguous-nodestructor.patch +++ /dev/null @@ -1,39 +0,0 @@ -From af77dc4014ead3d898fdc8a7a70fe5063ac9b102 Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Fri, 25 Oct 2019 19:01:29 +0000 -Subject: [PATCH] GCC: use brace-initializer for DohUpgrade vector - -Constructing NoDestructor with parenthesis constructor is ambiguous -in GCC. Use brace-initializer to avoid that problem. This fixes this -build error: - -Bug: 819294 -Change-Id: I00dda42daa1794d11e022f26ac07f92e599d106d -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879910 -Reviewed-by: Eric Orth -Commit-Queue: José Dapena Paz -Cr-Commit-Position: refs/heads/master@{#709569} ---- - -diff --git a/net/dns/dns_util.cc b/net/dns/dns_util.cc -index 14997c4..637b6f2 100644 ---- a/net/dns/dns_util.cc -+++ b/net/dns/dns_util.cc -@@ -144,7 +144,7 @@ - // DohProviderId histogram suffix list in - // tools/metrics/histograms/histograms.xml. - static const base::NoDestructor> -- upgradable_servers({ -+ upgradable_servers{{ - DohUpgradeEntry( - "CleanBrowsingAdult", - {"185.228.168.10", "185.228.169.11", "2a0d:2a00:1::1", -@@ -215,7 +215,7 @@ - {"9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9"}, - {"dns.quad9.net", "dns9.quad9.net"} /* DoT hostname */, - {"https://dns.quad9.net/dns-query", true /* use_post */}), -- }); -+ }}; - return *upgradable_servers; - } - diff --git a/srcpkgs/electron7/files/patches/chromium-79-gcc-includes.patch b/srcpkgs/electron7/files/patches/chromium-79-gcc-includes.patch deleted file mode 100644 index 05cb1e9b634..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-79-gcc-includes.patch +++ /dev/null @@ -1,102 +0,0 @@ -From cf2022b11cd3e28f1f3777b060fd509f665ff8e1 Mon Sep 17 00:00:00 2001 -From: Elvis Pranskevichus -Date: Mon, 6 Jul 2020 10:21:27 -0700 -Subject: [PATCH] GCC 10 Fixes - ---- - base/trace_event/trace_event_memory_overhead.h | 1 + - third_party/angle/include/platform/Platform.h | 1 + - third_party/perfetto/include/perfetto/base/task_runner.h | 2 ++ - third_party/webrtc/call/rtx_receive_stream.h | 1 + - 4 files changed, 5 insertions(+) - -diff --git a/base/trace_event/trace_event_memory_overhead.h b/base/trace_event/trace_event_memory_overhead.h -index 69468d4..e10a3ec 100644 ---- a/base/trace_event/trace_event_memory_overhead.h -+++ b/base/trace_event/trace_event_memory_overhead.h -@@ -8,6 +8,7 @@ - #include - #include - -+#include - #include - - #include "base/base_export.h" -diff --git a/third_party/angle/include/platform/Platform.h b/third_party/angle/include/platform/Platform.h -index cea6070..0fbd64f 100644 ---- a/third_party/angle/include/platform/Platform.h -+++ b/third_party/angle/include/platform/Platform.h -@@ -9,6 +9,7 @@ - #ifndef ANGLE_PLATFORM_H - #define ANGLE_PLATFORM_H - -+#include - #include - #include - -diff --git a/third_party/perfetto/include/perfetto/base/task_runner.h b/third_party/perfetto/include/perfetto/base/task_runner.h -index cf60401..040aab2 100644 ---- a/third_party/perfetto/include/perfetto/base/task_runner.h -+++ b/third_party/perfetto/include/perfetto/base/task_runner.h -@@ -17,6 +17,8 @@ - #ifndef INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_ - #define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_ - -+#include -+ - #include - - #include "perfetto/base/export.h" -diff --git a/third_party/webrtc/call/rtx_receive_stream.h b/third_party/webrtc/call/rtx_receive_stream.h -index 8ffa440..fb2f9f4 100644 ---- a/third_party/webrtc/call/rtx_receive_stream.h -+++ b/third_party/webrtc/call/rtx_receive_stream.h -@@ -11,6 +11,8 @@ - #ifndef CALL_RTX_RECEIVE_STREAM_H_ - #define CALL_RTX_RECEIVE_STREAM_H_ - -+#include -+ - #include - - #include "call/rtp_packet_sink_interface.h" -diff --git a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -index 22528c9..2ba90bb 100644 ---- a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -+++ b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h -@@ -11,6 +11,8 @@ - #ifndef MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_ - #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_ - -+#include -+ - #include - - namespace webrtc { -diff --git a/media/cdm/supported_cdm_versions.h b/media/cdm/supported_cdm_versions.h -index 3f220da..c54e3bb 100644 ---- a/media/cdm/supported_cdm_versions.h -+++ b/media/cdm/supported_cdm_versions.h -@@ -6,6 +6,7 @@ - #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ - - #include -+#include - - #include "media/base/media_export.h" - #include "media/cdm/api/content_decryption_module.h" -diff --git a/third_party/webrtc/modules/video_coding/decoding_state.h b/third_party/webrtc/modules/video_coding/decoding_state.h -index b87fb2d..ec97294 100644 ---- a/third_party/webrtc/modules/video_coding/decoding_state.h -+++ b/third_party/webrtc/modules/video_coding/decoding_state.h -@@ -11,6 +11,7 @@ - #ifndef MODULES_VIDEO_CODING_DECODING_STATE_H_ - #define MODULES_VIDEO_CODING_DECODING_STATE_H_ - -+#include - #include - #include - #include --- -2.26.2 - diff --git a/srcpkgs/electron7/files/patches/chromium-79-gcc-status-enum.patch b/srcpkgs/electron7/files/patches/chromium-79-gcc-status-enum.patch deleted file mode 100644 index ef57ce774a9..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-79-gcc-status-enum.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d48486507d6b4ed130696721a758e2a231066cf7 Mon Sep 17 00:00:00 2001 -From: Elvis Pranskevichus -Date: Mon, 6 Jul 2020 16:33:14 -0700 -Subject: [PATCH] GCC-X11-Success-enum - ---- - components/viz/host/host_display_client.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h -index 72a807e..257bc86 100644 ---- a/components/viz/host/host_display_client.h -+++ b/components/viz/host/host_display_client.h -@@ -13,7 +13,14 @@ - #include "build/build_config.h" - #include "components/viz/host/viz_host_export.h" - #include "mojo/public/cpp/bindings/binding.h" -+#ifdef Success -+#undef Success -+#define __X11_SUCCESS -+#endif - #include "services/viz/privileged/mojom/compositing/display_private.mojom.h" -+#ifdef __X11_SUCCESS -+#define Success 0 -+#endif - #include "ui/gfx/native_widget_types.h" - - namespace viz { --- -2.26.2 - diff --git a/srcpkgs/electron7/files/patches/chromium-79-icu-65.patch b/srcpkgs/electron7/files/patches/chromium-79-icu-65.patch deleted file mode 100644 index e0732b6ace2..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-79-icu-65.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index 5a62770..1fae2aa 100644 ---- a/third_party/blink/renderer/core/dom/document.cc -+++ b/third_party/blink/renderer/core/dom/document.cc -@@ -6192,7 +6192,7 @@ static ParseQualifiedNameResult ParseQualifiedNameInternal( - - for (unsigned i = 0; i < length;) { - UChar32 c; -- U16_NEXT(characters, i, length, c) -+ U16_NEXT(characters, i, length, c); - if (c == ':') { - if (saw_colon) - return ParseQualifiedNameResult(kQNMultipleColons); diff --git a/srcpkgs/electron7/files/patches/chromium-79-icu-67.patch b/srcpkgs/electron7/files/patches/chromium-79-icu-67.patch deleted file mode 100644 index c18b3ed5c51..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-79-icu-67.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 64b8ee6fc65bcce07bcaa4bba5f61f29c5495253 Mon Sep 17 00:00:00 2001 -From: Frank Tang -Date: Fri, 3 Apr 2020 23:13:54 -0700 -Subject: [PATCH] [intl] Remove soon-to-be removed getAllFieldPositions - -Needed to land ICU67.1 soon. - -Bug: v8:10393 -Change-Id: I3c7737ca600d6ccfdc46ffaddfb318ce60bc7618 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2136489 -Reviewed-by: Jakob Kummerow -Commit-Queue: Frank Tang -Cr-Commit-Position: refs/heads/master@{#67027} ---- - v8/src/objects/js-number-format.cc | 76 +++++++++++++++++---------------- - 1 file changed, 40 insertions(+), 36 deletions(-) - -diff --git a/v8/src/objects/js-number-format.cc b/v8/src/objects/js-number-format.cc -index ff564975d6..ad8e173b59 100644 ---- a/v8/src/objects/js-number-format.cc -+++ b/v8/src/objects/js-number-format.cc -@@ -1257,42 +1257,33 @@ MaybeHandle JSNumberFormat::New(Isolate* isolate, - } - - namespace { --Maybe IcuFormatNumber( -+Maybe IcuFormatNumber( - Isolate* isolate, - const icu::number::LocalizedNumberFormatter& number_format, -- Handle numeric_obj, icu::FieldPositionIterator* fp_iter) { -+ Handle numeric_obj, icu::number::FormattedNumber* formatted) { - // If it is BigInt, handle it differently. - UErrorCode status = U_ZERO_ERROR; -- icu::number::FormattedNumber formatted; - if (numeric_obj->IsBigInt()) { - Handle big_int = Handle::cast(numeric_obj); - Handle big_int_string; - ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string, - BigInt::ToString(isolate, big_int), -- Nothing()); -- formatted = number_format.formatDecimal( -+ Nothing()); -+ *formatted = number_format.formatDecimal( - {big_int_string->ToCString().get(), big_int_string->length()}, status); - } else { -- double number = numeric_obj->Number(); -- formatted = number_format.formatDouble(number, status); -+ double number = numeric_obj->IsNaN() -+ ? std::numeric_limits::quiet_NaN() -+ : numeric_obj->Number(); -+ *formatted = number_format.formatDouble(number, status); - } - if (U_FAILURE(status)) { - // This happen because of icu data trimming trim out "unit". - // See https://bugs.chromium.org/p/v8/issues/detail?id=8641 -- THROW_NEW_ERROR_RETURN_VALUE(isolate, -- NewTypeError(MessageTemplate::kIcuError), -- Nothing()); -- } -- if (fp_iter) { -- formatted.getAllFieldPositions(*fp_iter, status); -+ THROW_NEW_ERROR_RETURN_VALUE( -+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing()); - } -- icu::UnicodeString result = formatted.toString(status); -- if (U_FAILURE(status)) { -- THROW_NEW_ERROR_RETURN_VALUE(isolate, -- NewTypeError(MessageTemplate::kIcuError), -- Nothing()); -- } -- return Just(result); -+ return Just(true); - } - - } // namespace -@@ -1303,10 +1294,16 @@ MaybeHandle JSNumberFormat::FormatNumeric( - Handle numeric_obj) { - DCHECK(numeric_obj->IsNumeric()); - -- Maybe maybe_format = -- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr); -+ icu::number::FormattedNumber formatted; -+ Maybe maybe_format = -+ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted); - MAYBE_RETURN(maybe_format, Handle()); -- return Intl::ToString(isolate, maybe_format.FromJust()); -+ UErrorCode status = U_ZERO_ERROR; -+ icu::UnicodeString result = formatted.toString(status); -+ if (U_FAILURE(status)) { -+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String); -+ } -+ return Intl::ToString(isolate, result); - } - - namespace { -@@ -1419,12 +1416,18 @@ std::vector FlattenRegionsToParts( - } - - namespace { --Maybe ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, -- icu::FieldPositionIterator* fp_iter, -+Maybe ConstructParts(Isolate* isolate, -+ icu::number::FormattedNumber* formatted, - Handle result, int start_index, - Handle numeric_obj, bool style_is_unit) { -+ UErrorCode status = U_ZERO_ERROR; -+ icu::UnicodeString formatted_text = formatted->toString(status); -+ if (U_FAILURE(status)) { -+ THROW_NEW_ERROR_RETURN_VALUE( -+ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing()); -+ } - DCHECK(numeric_obj->IsNumeric()); -- int32_t length = formatted.length(); -+ int32_t length = formatted_text.length(); - int index = start_index; - if (length == 0) return Just(index); - -@@ -1433,13 +1436,14 @@ Maybe ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, - // other region covers some part of the formatted string. It's possible - // there's another field with exactly the same begin and end as this backdrop, - // in which case the backdrop's field_id of -1 will give it lower priority. -- regions.push_back(NumberFormatSpan(-1, 0, formatted.length())); -+ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length())); - - { -- icu::FieldPosition fp; -- while (fp_iter->next(fp)) { -- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(), -- fp.getEndIndex())); -+ icu::ConstrainedFieldPosition cfp; -+ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER); -+ while (formatted->nextPosition(cfp, status)) { -+ regions.push_back( -+ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit())); - } - } - -@@ -1461,7 +1465,7 @@ Maybe ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, - Handle substring; - ASSIGN_RETURN_ON_EXCEPTION_VALUE( - isolate, substring, -- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos), -+ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos), - Nothing()); - Intl::AddElement(isolate, result, index, field_type_string, substring); - ++index; -@@ -1481,14 +1485,14 @@ MaybeHandle JSNumberFormat::FormatToParts( - number_format->icu_number_formatter().raw(); - CHECK_NOT_NULL(fmt); - -- icu::FieldPositionIterator fp_iter; -- Maybe maybe_format = -- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter); -+ icu::number::FormattedNumber formatted; -+ Maybe maybe_format = -+ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted); - MAYBE_RETURN(maybe_format, Handle()); - - Handle result = factory->NewJSArray(0); - Maybe maybe_format_to_parts = ConstructParts( -- isolate, maybe_format.FromJust(), &fp_iter, result, 0, numeric_obj, -+ isolate, &formatted, result, 0, numeric_obj, - number_format->style() == JSNumberFormat::Style::UNIT); - MAYBE_RETURN(maybe_format_to_parts, Handle()); - --- -2.26.2 diff --git a/srcpkgs/electron7/files/patches/chromium-chromium_atk_optional.patch.patch b/srcpkgs/electron7/files/patches/chromium-chromium_atk_optional.patch.patch deleted file mode 100644 index 27b56251ec3..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-chromium_atk_optional.patch.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/build/config/ui.gni b/build/config/ui.gni -index 547b42f..966b00c 100644 ---- a/build/config/ui.gni -+++ b/build/config/ui.gni -@@ -51,8 +51,10 @@ if (use_ozone) { - use_glib = false - } - --# Whether to use atk, the Accessibility ToolKit library --use_atk = is_desktop_linux && use_x11 -+declare_args() { -+ # Whether to use atk, the Accessibility ToolKit library -+ use_atk = is_desktop_linux && use_x11 -+} - # ============================================= - # PLEASE DO NOT ADD MORE FLAGS TO THIS FILE - # ============================================= diff --git a/srcpkgs/electron7/files/patches/chromium-clang10_glslang.patch.patch b/srcpkgs/electron7/files/patches/chromium-clang10_glslang.patch.patch deleted file mode 100644 index 91ef84ca7e6..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-clang10_glslang.patch.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 24b3e8384e93f3e73b6aa14ea00a30574112f9ba Mon Sep 17 00:00:00 2001 -From: Reid Kleckner -Date: Wed, 4 Dec 2019 14:09:03 -0800 -Subject: [PATCH] Remove glslang::pool_allocator::setAllocator - -TPoolAllocator is not copy assignable, so this setter could never have -been used. After a recent change (878a24ee2), new versions of Clang -reject this code outright. ---- - glslang/Include/PoolAlloc.h | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/glslang/Include/PoolAlloc.h b/glslang/Include/PoolAlloc.h -index 0e237a6a2..b8eccb883 100644 ---- a/third_party/glslang/src/glslang/Include/PoolAlloc.h -+++ b/third_party/glslang/src/glslang/Include/PoolAlloc.h -@@ -304,7 +304,6 @@ class pool_allocator { - size_type max_size() const { return static_cast(-1) / sizeof(T); } - size_type max_size(int size) const { return static_cast(-1) / size; } - -- void setAllocator(TPoolAllocator* a) { allocator = *a; } - TPoolAllocator& getAllocator() const { return allocator; } - - protected: - diff --git a/srcpkgs/electron7/files/patches/chromium-compiler-r10.patch b/srcpkgs/electron7/files/patches/chromium-compiler-r10.patch deleted file mode 100644 index f2ecdc3f32b..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-compiler-r10.patch +++ /dev/null @@ -1,185 +0,0 @@ -From a1207cc75454e653030716948d27ec27412f6fe8 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Sat, 16 Jun 2019 15:43:27 +0100 -Subject: [PATCH] Disable various compiler configs - ---- - build/config/compiler/BUILD.gn | 64 +++++++++++++--------------------- - 1 file changed, 25 insertions(+), 39 deletions(-) - -diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index a3f21b7..0a7bec6 100644 ---- a/build/config/compiler/BUILD.gn -+++ b/build/config/compiler/BUILD.gn -@@ -230,8 +230,6 @@ config("compiler") { - - configs += [ - # See the definitions below. -- ":clang_revision", -- ":compiler_cpu_abi", - ":compiler_codegen", - ":compiler_deterministic", - ] -@@ -471,20 +469,6 @@ config("compiler") { - } - } - -- if (is_clang && !is_nacl && !use_xcode_clang) { -- cflags += [ "-fcrash-diagnostics-dir=" + -- rebase_path("//tools/clang/crashreports", root_build_dir) ] -- -- cflags += [ -- # TODO(hans): Remove this once Clang generates better optimized debug info -- # by default. https://crbug.com/765793 -- "-Xclang", -- "-mllvm", -- "-Xclang", -- "-instcombine-lower-dbg-declare=0", -- ] -- } -- - # C11/C++11 compiler flags setup. - # --------------------------- - if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") { -@@ -1431,6 +1415,12 @@ config("default_warnings") { - "-Wno-narrowing", - ] - -+ # -Wno-class-memaccess warns about hash table and vector in blink. -+ # But the violation is intentional. -+ if (!is_nacl) { -+ cflags_cc += [ "-Wno-class-memaccess" ] -+ } -+ - # -Wunused-local-typedefs is broken in gcc, - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872 - cflags += [ "-Wno-unused-local-typedefs" ] -@@ -1525,7 +1515,7 @@ config("chromium_code") { - defines = [ "_HAS_NODISCARD" ] - } - } else { -- cflags = [ "-Wall" ] -+ cflags = [] - if (treat_warnings_as_errors) { - cflags += [ "-Werror" ] - -@@ -1534,10 +1524,6 @@ config("chromium_code") { - # well. - ldflags = [ "-Werror" ] - } -- if (is_clang) { -- # Enable extra warnings for chromium_code when we control the compiler. -- cflags += [ "-Wextra" ] -- } - - # In Chromium code, we define __STDC_foo_MACROS in order to get the - # C99 macros on Mac and Linux. -@@ -1546,15 +1532,6 @@ config("chromium_code") { - "__STDC_FORMAT_MACROS", - ] - -- if (!is_debug && !using_sanitizer && current_cpu != "s390x" && -- current_cpu != "s390" && current_cpu != "ppc64" && -- current_cpu != "mips" && current_cpu != "mips64") { -- # Non-chromium code is not guaranteed to compile cleanly with -- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are -- # disabled, so only do that for Release build. -- defines += [ "_FORTIFY_SOURCE=2" ] -- } -- - if (is_mac) { - cflags_objc = [ "-Wobjc-missing-property-synthesis" ] - cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] -@@ -1943,7 +1920,8 @@ config("default_stack_frames") { - } - - # Default "optimization on" config. --config("optimize") { -+config("optimize") { } -+config("xoptimize") { - if (is_win) { - # TODO(thakis): Remove is_clang here, https://crbug.com/598772 - if (is_official_build && full_wpo_on_official && !is_clang) { -@@ -1977,7 +1955,8 @@ config("optimize") { - } - - # Same config as 'optimize' but without the WPO flag. --config("optimize_no_wpo") { -+config("optimize_no_wpo") { } -+config("xoptimize_no_wpo") { - if (is_win) { - # Favor size over speed, /O1 must be before the common flags. The GYP - # build also specifies /Os and /GF but these are implied by /O1. -@@ -2000,7 +1979,8 @@ config("optimize_no_wpo") { - } - - # Turn off optimizations. --config("no_optimize") { -+config("no_optimize") { } -+config("xno_optimize") { - if (is_win) { - cflags = [ - "/Od", # Disable optimization. -@@ -2028,7 +2008,8 @@ config("no_optimize") { - # Turns up the optimization level. On Windows, this implies whole program - # optimization and link-time code generation which is very expensive and should - # be used sparingly. --config("optimize_max") { -+config("optimize_max") { } -+config("xoptimize_max") { - if (is_nacl && is_nacl_irt) { - # The NaCl IRT is a special case and always wants its own config. - # Various components do: -@@ -2075,7 +2056,8 @@ config("optimize_max") { - # - # TODO(crbug.com/621335) - rework how all of these configs are related - # so that we don't need this disclaimer. --config("optimize_speed") { -+config("optimize_speed") { } -+config("xoptimize_speed") { - if (is_nacl && is_nacl_irt) { - # The NaCl IRT is a special case and always wants its own config. - # Various components do: -@@ -2113,7 +2095,8 @@ config("optimize_speed") { - } - } - --config("optimize_fuzzing") { -+config("optimize_fuzzing") { } -+config("xoptimize_fuzzing") { - cflags = [ "-O1" ] + common_optimize_on_cflags - ldflags = common_optimize_on_ldflags - visibility = [ ":default_optimization" ] -@@ -2215,7 +2198,8 @@ config("win_pdbaltpath") { - } - - # Full symbols. --config("symbols") { -+config("symbols") { } -+config("xsymbols") { - if (is_win) { - if (use_goma || is_clang) { - # Note that with VC++ this requires is_win_fastlink, enforced elsewhere. -@@ -2325,7 +2309,8 @@ config("symbols") { - # Minimal symbols. - # This config guarantees to hold symbol for stack trace which are shown to user - # when crash happens in unittests running on buildbot. --config("minimal_symbols") { -+config("minimal_symbols") { } -+config("xminimal_symbols") { - if (is_win) { - # Linker symbols for backtraces only. - cflags = [] -@@ -2382,7 +2367,8 @@ config("minimal_symbols") { - } - - # No symbols. --config("no_symbols") { -+config("no_symbols") { } -+config("xno_symbols") { - if (!is_win) { - cflags = [ "-g0" ] - asmflags = cflags --- -2.21.0 - diff --git a/srcpkgs/electron7/files/patches/chromium-fix-char_traits.patch b/srcpkgs/electron7/files/patches/chromium-fix-char_traits.patch deleted file mode 100644 index 4cb9503a93f..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-fix-char_traits.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/base/strings/char_traits.h -+++ b/base/strings/char_traits.h -@@ -67,9 +67,9 @@ - return __builtin_memcmp(s1, s2, n); - #else - for (; n; --n, ++s1, ++s2) { -- if (*s1 < *s2) -+ if ((unsigned char)*s1 < (unsigned char)*s2) - return -1; -- if (*s1 > *s2) -+ if ((unsigned char)*s1 > (unsigned char)*s2) - return 1; - } - return 0; diff --git a/srcpkgs/electron7/files/patches/chromium-fix-commandline-include.patch b/srcpkgs/electron7/files/patches/chromium-fix-commandline-include.patch deleted file mode 100644 index 15da794cbba..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-fix-commandline-include.patch +++ /dev/null @@ -1,44 +0,0 @@ -Electron patches the file to use base::CommandLine, but forgot to include -the necessary header for it. ---- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc.orig 2020-04-27 13:49:41.408592941 +0200 -+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc 2020-04-27 13:49:53.841071830 +0200 -@@ -4,6 +4,7 @@ - - #include "third_party/blink/renderer/platform/graphics/canvas_color_params.h" - -+#include "base/command_line.h" - #include "cc/paint/skia_paint_canvas.h" - #include "components/viz/common/resources/resource_format_utils.h" - #include "third_party/blink/renderer/platform/runtime_enabled_features.h" ---- a/third_party/blink/public/platform/web_rtc_rtp_source.h.orig 2020-04-27 14:16:05.323085814 +0200 -+++ b/third_party/blink/public/platform/web_rtc_rtp_source.h 2020-04-27 14:16:17.279480838 +0200 -@@ -7,6 +7,7 @@ - - #include "base/optional.h" - #include "third_party/blink/public/platform/web_common.h" -+#include - - namespace base { - class TimeTicks; ---- a/chrome/browser/chrome_content_browser_client.cc.orig 2020-04-27 16:16:27.291208394 +0200 -+++ b/chrome/browser/chrome_content_browser_client.cc 2020-04-27 16:16:49.283984217 +0200 -@@ -2896,6 +2896,8 @@ - const std::string& frame_name, - WindowOpenDisposition disposition, - const blink::mojom::WindowFeatures& features, -+ const std::vector& additional_features, -+ const scoped_refptr& body, - bool user_gesture, - bool opener_suppressed, - bool* no_javascript_access) { ---- a/chrome/browser/chrome_content_browser_client.h.orig 2020-04-27 16:15:41.932359753 +0200 -+++ b/chrome/browser/chrome_content_browser_client.h 2020-04-27 16:16:09.798318845 +0200 -@@ -303,6 +303,8 @@ - const std::string& frame_name, - WindowOpenDisposition disposition, - const blink::mojom::WindowFeatures& features, -+ const std::vector& additional_features, -+ const scoped_refptr& body, - bool user_gesture, - bool opener_suppressed, - bool* no_javascript_access) override; diff --git a/srcpkgs/electron7/files/patches/chromium-fix-sucess-definition.patch b/srcpkgs/electron7/files/patches/chromium-fix-sucess-definition.patch deleted file mode 100644 index 4dc024693e6..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-fix-sucess-definition.patch +++ /dev/null @@ -1,15 +0,0 @@ -X11.h defines a macro called "Success", which is 0. This breaks an enum -that is generated in Chromium that has a member "Success", so undefine -it. ---- a/chrome/browser/ui/libgtkui/select_file_dialog_impl_kde.cc.orig 2020-04-27 18:42:15.457297544 +0200 -+++ b/chrome/browser/ui/libgtkui/select_file_dialog_impl_kde.cc 2020-04-27 18:42:21.760454304 +0200 -@@ -24,7 +24,9 @@ - #include "base/task/post_task.h" - #include "base/task/task_traits.h" - #include "base/threading/thread_restrictions.h" -+#undef Success - #include "chrome/browser/ui/libgtkui/select_file_dialog_impl.h" -+#define Success 0 - #include "content/public/browser/browser_thread.h" - #include "ui/aura/window_tree_host.h" - #include "ui/base/l10n/l10n_util.h" diff --git a/srcpkgs/electron7/files/patches/chromium-gcc-lto.patch b/srcpkgs/electron7/files/patches/chromium-gcc-lto.patch deleted file mode 100644 index 1e09cb8044c..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-gcc-lto.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 15d9b2515631cedcbd427e4c6de2dd4e7a0bfa36 Mon Sep 17 00:00:00 2001 -From: Elvis Pranskevichus -Date: Sat, 4 Jan 2020 16:03:03 -0500 -Subject: [PATCH] GCC LTO Support - ---- - build/config/BUILD.gn | 6 +++++- - build/config/compiler/BUILD.gn | 30 ++++++++++++++++++++++-------- - build/config/compiler/compiler.gni | 2 +- - sandbox/linux/BUILD.gn | 3 +++ - 4 files changed, 31 insertions(+), 10 deletions(-) - -diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn -index 514ab7b..f8d36fe 100644 ---- a/build/config/BUILD.gn -+++ b/build/config/BUILD.gn -@@ -260,9 +260,13 @@ config("default_libs") { - } else if (is_linux) { - libs = [ - "dl", -- "pthread", - "rt", - ] -+ ldflags = [ -+ "-Wl,--no-as-needed", -+ "-lpthread", -+ "-Wl,--as-needed" -+ ] - } - } - -diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index a3f21b7..48747f7 100644 ---- a/build/config/compiler/BUILD.gn -+++ b/build/config/compiler/BUILD.gn -@@ -558,12 +558,13 @@ config("compiler") { - # TODO(pcc): Make this conditional on is_official_build rather than on gn - # flags for specific features. - if (!is_debug && use_thin_lto && is_a_target_toolchain) { -- assert(use_lld || target_os == "chromeos", -- "gold plugin only supported with ChromeOS") -- -- cflags += [ "-flto=thin" ] -+ if (is_clang) { -+ cflags += [ "-flto=thin" ] -+ } else { -+ cflags += [ "-flto=2", "-fno-fat-lto-objects", "-fuse-linker-plugin" ] -+ } - -- if (target_os != "chromeos") { -+ if (target_os != "chromeos" && is_clang) { - cflags += [ "-fsplit-lto-unit" ] - } - -@@ -586,7 +587,11 @@ config("compiler") { - "-mllvm:-import-instr-limit=10", - ] - } else { -- ldflags += [ "-flto=thin" ] -+ if (is_clang) { -+ ldflags += [ "-flto=thin" ] -+ } else { -+ ldflags += [ "-flto=8", "-fno-fat-lto-objects", "-fuse-linker-plugin" ] -+ } - - # Limit the parallelism to avoid too aggressive competition between - # linker jobs. This is still suboptimal to a potential dynamic -@@ -607,7 +612,7 @@ config("compiler") { - "-Wl,--thinlto-cache-policy,$cache_policy", - ] - } -- } else { -+ } else if (is_clang) { - ldflags += [ "-Wl,-plugin-opt,jobs=8" ] - } - -@@ -630,7 +635,7 @@ config("compiler") { - - # TODO(pcc): Re-enable this flag on Android. This will require libc++ to be - # built with ThinLTO (see https://crbug.com/767901) as well as the GVR shim. -- if (!is_android) { -+ if (!is_android && is_clang) { - cflags += [ "-fwhole-program-vtables" ] - if (!is_win) { - ldflags += [ "-fwhole-program-vtables" ] -@@ -697,6 +702,15 @@ config("compiler") { - } - } - -+config("compiler_no_lto") { -+ cflags = [] -+ ldflags = [] -+ if (!is_debug && use_thin_lto && is_a_target_toolchain) { -+ cflags += ["-fno-lto"] -+ ldflags += ["-fno-lto"] -+ } -+} -+ - # This provides the basic options to select the target CPU and ABI. - # It is factored out of "compiler" so that special cases can use this - # without using everything that "compiler" brings in. Options that -diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni -index c351d6b..e567372 100644 ---- a/build/config/compiler/compiler.gni -+++ b/build/config/compiler/compiler.gni -@@ -57,7 +57,7 @@ declare_args() { - - # Enables support for ThinLTO, which links 3x-10x faster than full LTO. See - # also http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html -- use_thin_lto = is_cfi || (is_android && is_official_build) -+ use_thin_lto = false - - # Tell VS to create a PDB that references information in .obj files rather - # than copying it all. This should improve linker performance. mspdbcmf.exe -diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn -index b00a88c..e4615c0 100644 ---- a/sandbox/linux/BUILD.gn -+++ b/sandbox/linux/BUILD.gn -@@ -256,6 +256,9 @@ component("seccomp_bpf") { - "//base", - "//base/third_party/dynamic_annotations", - ] -+ configs += [ -+ "//build/config/compiler:compiler_no_lto" -+ ] - - if (is_nacl_nonsfi) { - cflags = [ "-fgnu-inline-asm" ] --- -2.24.1 - diff --git a/srcpkgs/electron7/files/patches/chromium-gcc-shared.patch b/srcpkgs/electron7/files/patches/chromium-gcc-shared.patch deleted file mode 100644 index 098b6832242..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-gcc-shared.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/build/toolchain/gcc_toolchain.gni 2019-11-19 02:27:43.000000000 +0100 -+++ - 2020-07-21 00:59:09.201421469 +0200 -@@ -371,7 +371,7 @@ - # .TOC file, overwrite it, otherwise, don't change it. - tocfile = sofile + ".TOC" - -- link_command = "$ld -shared -Wl,-soname=\"$soname\" {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" @\"$rspfile\"" -+ link_command = "$ld -shared -Wl,-soname=\"$soname\" {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -shared @\"$rspfile\"" - - # Generate a map file to be used for binary size analysis. - # Map file adds ~10% to the link time on a z620. -@@ -450,7 +450,7 @@ - unstripped_sofile = sofile - } - -- command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" @\"$rspfile\"" -+ command = "$ld -shared {{ldflags}}${extra_ldflags} -o \"$unstripped_sofile\" -Wl,-soname=\"$soname\" -shared @\"$rspfile\"" - - if (defined(invoker.strip)) { - strip_command = "${invoker.strip} -o \"$sofile\" \"$unstripped_sofile\"" diff --git a/srcpkgs/electron7/files/patches/chromium-gn_bootstrap_ninja.patch b/srcpkgs/electron7/files/patches/chromium-gn_bootstrap_ninja.patch deleted file mode 100644 index e9f95f09cae..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-gn_bootstrap_ninja.patch +++ /dev/null @@ -1,32 +0,0 @@ -Patch by Michael Forney - -Already merged https://chromium-review.googlesource.com/c/chromium/src/+/1975453 - ---- a/tools/gn/bootstrap/bootstrap.py -+++ b/tools/gn/bootstrap/bootstrap.py -@@ -70,6 +70,7 @@ - out_dir = os.path.join(SRC_ROOT, build_rel) - gn_path = options.output or os.path.join(out_dir, 'gn') - gn_build_dir = os.path.join(out_dir, 'gn_build') -+ ninja_binary = os.environ.get('NINJA', 'ninja') - - # TODO(thomasanderson): Remove this once Ubuntu Trusty reaches EOL, or when - # Chromium's infrastructure is upgraded from Trusty to Xenial, whichever comes -@@ -90,7 +91,7 @@ - os.environ.get('CFLAGS', '').split() + - os.environ.get('CXXFLAGS', '').split()), - ]) + '\n') -- subprocess.check_call(['ninja', '-C', libcxx_dir]) -+ subprocess.check_call([ninja_binary, '-C', libcxx_dir]) - shutil.copy2(os.path.join(gn_build_dir, 'libc++.gn.so'), out_dir) - - def append_to_env(var, vals): -@@ -120,7 +121,7 @@ - shutil.copy2( - os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir) - subprocess.check_call( -- ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err']) -+ [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']) - shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) - - if not options.skip_generate_buildfiles: diff --git a/srcpkgs/electron7/files/patches/chromium-libc_malloc.patch b/srcpkgs/electron7/files/patches/chromium-libc_malloc.patch deleted file mode 100644 index 27cd2cefc46..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-libc_malloc.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/base/process/memory_linux.cc.orig 2017-09-15 08:41:43.000000000 +0000 -+++ b/base/process/memory_linux.cc 2017-09-15 08:44:39.804995469 +0000 -@@ -21,6 +21,12 @@ - #include "third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h" - #endif - -+#if defined(LIBC_GLIBC) -+extern "C" { -+extern void *__libc_malloc(size_t size); -+} -+#endif -+ - namespace base { - - size_t g_oom_size = 0U; ---- a/base/process/memory_linux.cc.orig 2017-09-15 08:46:55.000000000 +0000 -+++ b/base/process/memory_linux.cc 2017-09-15 08:51:34.422016858 +0000 -@@ -107,7 +107,7 @@ - (!defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)) - *result = malloc(size); - #elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC) -- *result = __libc_malloc(size); -+ *result = ::__libc_malloc(size); - #elif defined(USE_TCMALLOC) - *result = tc_malloc_skip_new_handler(size); - #endif diff --git a/srcpkgs/electron7/files/patches/chromium-toolchain-host.patch b/srcpkgs/electron7/files/patches/chromium-toolchain-host.patch deleted file mode 100644 index 0dace261a08..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-toolchain-host.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/build/toolchain/linux/unbundle/BUILD.gn 2020-07-21 17:36:34.064748261 +0200 -+++ - 2020-07-21 17:39:03.115740522 +0200 -@@ -35,7 +35,7 @@ - extra_ldflags = getenv("BUILD_LDFLAGS") - - toolchain_args = { -- current_cpu = current_cpu -+ current_cpu = host_cpu - current_os = current_os - } - } diff --git a/srcpkgs/electron7/files/patches/chromium-unbundle-zlib-r1.patch b/srcpkgs/electron7/files/patches/chromium-unbundle-zlib-r1.patch deleted file mode 100644 index 951a2adb196..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-unbundle-zlib-r1.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/third_party/perfetto/gn/BUILD.gn b/third_party/perfetto/gn/BUILD.gn -index 3bc618a..e0ddf6d 100644 ---- a/third_party/perfetto/gn/BUILD.gn -+++ b/third_party/perfetto/gn/BUILD.gn -@@ -244,7 +244,7 @@ if (enable_perfetto_trace_processor || perfetto_build_standalone || - "//buildtools:zlib", - ] - } else { -- public_configs = [ "//third_party/zlib:zlib_config" ] -+ public_configs = [ "//third_party/zlib:system_zlib" ] - public_deps = [ - "//third_party/zlib", - ] diff --git a/srcpkgs/electron7/files/patches/chromium-upstream-force-mp3-files-to-have-a-start-time-of-zero.patch b/srcpkgs/electron7/files/patches/chromium-upstream-force-mp3-files-to-have-a-start-time-of-zero.patch deleted file mode 100644 index d018a87094d..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-upstream-force-mp3-files-to-have-a-start-time-of-zero.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 192fc3899f76e9487d77895f31df8d2d13bf9619 Mon Sep 17 00:00:00 2001 -From: Dale Curtis -Date: Fri, 26 Jun 2020 01:10:55 +0000 -Subject: [PATCH] Force mp3 files to have a start time of zero. - -This will allow us to remove our custom patch which breaks upstream -ffmpeg functionality for unknown reasons. - -R=sandersd - -Fixed: 1062037 -Change-Id: I253011843dee4dd6a8c958b14990ad836a9f1dca -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2268221 -Auto-Submit: Dale Curtis -Reviewed-by: Dan Sanders -Commit-Queue: Dale Curtis -Cr-Commit-Position: refs/heads/master@{#782792} ---- - media/filters/ffmpeg_demuxer.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc -index 01266e1a072..a7ed542b5fc 100644 ---- a/media/filters/ffmpeg_demuxer.cc -+++ b/media/filters/ffmpeg_demuxer.cc -@@ -1522,6 +1522,12 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) { - if (glue_->container() == container_names::CONTAINER_AVI) - format_context->flags |= AVFMT_FLAG_GENPTS; - -+ // FFmpeg will incorrectly adjust the start time of MP3 files into the future -+ // based on discard samples. We were unable to fix this upstream without -+ // breaking ffmpeg functionality. https://crbug.com/1062037 -+ if (glue_->container() == container_names::CONTAINER_MP3) -+ start_time_ = base::TimeDelta(); -+ - // For testing purposes, don't overwrite the timeline offset if set already. - if (timeline_offset_.is_null()) { - timeline_offset_ = diff --git a/srcpkgs/electron7/files/patches/chromium-xxx-ppc64le.patch b/srcpkgs/electron7/files/patches/chromium-xxx-ppc64le.patch deleted file mode 100644 index 2bd50025715..00000000000 --- a/srcpkgs/electron7/files/patches/chromium-xxx-ppc64le.patch +++ /dev/null @@ -1,4141 +0,0 @@ -From 240f0be5fdf851bd1256a30d4af1a7127b2bf47a Mon Sep 17 00:00:00 2001 -From: Daniel Kolesa -Date: Sat, 12 Sep 2020 05:52:04 +0200 -Subject: [PATCH] ppc64le support - ---- - build/download_nacl_toolchains.py | 4 + - chrome/installer/linux/BUILD.gn | 3 - - sandbox/features.gni | 2 +- - sandbox/linux/BUILD.gn | 2 + - sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 + - sandbox/linux/bpf_dsl/seccomp_macros.h | 48 ++++ - .../seccomp-bpf-helpers/baseline_policy.cc | 10 +- - .../baseline_policy_unittest.cc | 2 + - .../syscall_parameters_restrictions.cc | 36 ++- - .../syscall_parameters_restrictions.h | 2 +- - .../linux/seccomp-bpf-helpers/syscall_sets.cc | 140 +++++++----- - .../linux/seccomp-bpf-helpers/syscall_sets.h | 11 +- - sandbox/linux/seccomp-bpf/syscall.cc | 62 ++++- - sandbox/linux/seccomp-bpf/trap.cc | 14 ++ - sandbox/linux/services/credentials.cc | 2 +- - sandbox/linux/services/syscall_wrappers.cc | 2 +- - .../linux/syscall_broker/broker_process.cc | 2 +- - sandbox/linux/system_headers/linux_seccomp.h | 9 + - sandbox/linux/system_headers/linux_signal.h | 2 +- - sandbox/linux/system_headers/linux_syscalls.h | 4 + - sandbox/linux/system_headers/linux_ucontext.h | 2 + - .../system_headers/ppc64_linux_syscalls.h | 12 + - .../system_headers/ppc64_linux_ucontext.h | 12 + - script/list_patch_targets.py | 23 ++ - .../linux/bpf_renderer_policy_linux.cc | 5 + - .../angle/src/compiler/translator/InfoSink.h | 11 +- - third_party/angle/src/libANGLE/Constants.h | 1 + - third_party/boringssl/BUILD.gn | 7 + - .../dump_writer_common/raw_context_cpu.h | 2 + - .../linux/dump_writer_common/thread_info.cc | 56 ++++- - .../linux/dump_writer_common/thread_info.h | 9 + - .../dump_writer_common/ucontext_reader.cc | 42 ++++ - .../dump_writer_common/ucontext_reader.h | 3 + - .../client/linux/handler/exception_handler.cc | 22 +- - .../client/linux/handler/exception_handler.h | 6 +- - .../handler/exception_handler_unittest.cc | 8 +- - .../microdump_writer/microdump_writer.cc | 14 +- - .../microdump_writer_unittest.cc | 15 +- - .../minidump_writer/linux_core_dumper.cc | 8 +- - .../linux/minidump_writer/linux_dumper.cc | 4 +- - .../linux/minidump_writer/linux_dumper.h | 3 +- - .../linux_dumper_unittest_helper.cc | 2 + - .../minidump_writer/linux_ptrace_dumper.cc | 19 +- - .../linux_ptrace_dumper_unittest.cc | 5 + - .../linux/minidump_writer/minidump_writer.cc | 18 +- - .../linux/minidump_writer/minidump_writer.h | 2 + - .../minidump_writer_unittest.cc | 3 + - .../src/common/linux/memory_mapped_file.cc | 3 +- - .../linux/memory_mapped_file_unittest.cc | 7 +- - .../src/processor/exploitability_linux.cc | 2 + - .../src/processor/exploitability_unittest.cc | 15 +- - .../tools/linux/md2core/minidump-2-core.cc | 45 ++++ - third_party/crashpad/crashpad/CONTRIBUTORS | 1 + - .../crashpad/crashpad/compat/linux/sys/user.h | 1 + - .../crashpad/minidump/minidump_context.h | 64 ++++++ - .../minidump/minidump_context_writer.cc | 50 +++++ - .../minidump/minidump_context_writer.h | 39 ++++ - .../minidump/minidump_context_writer_test.cc | 15 ++ - .../minidump/minidump_misc_info_writer.cc | 2 + - .../crashpad/snapshot/capture_memory.cc | 5 + - .../crashpad/snapshot/cpu_architecture.h | 5 +- - .../crashpad/crashpad/snapshot/cpu_context.cc | 5 + - .../crashpad/crashpad/snapshot/cpu_context.h | 19 ++ - .../snapshot/linux/cpu_context_linux.h | 73 ++++++ - .../snapshot/linux/debug_rendezvous_test.cc | 4 +- - .../linux/exception_snapshot_linux.cc | 63 ++++++ - .../snapshot/linux/exception_snapshot_linux.h | 2 + - .../linux/exception_snapshot_linux_test.cc | 21 ++ - .../snapshot/linux/process_reader_linux.cc | 2 + - .../linux/process_reader_linux_test.cc | 2 + - .../crashpad/snapshot/linux/signal_context.h | 83 +++++++ - .../snapshot/linux/system_snapshot_linux.cc | 11 + - .../snapshot/linux/thread_snapshot_linux.cc | 8 + - .../snapshot/linux/thread_snapshot_linux.h | 2 + - .../crashpad/util/linux/auxiliary_vector.cc | 5 + - .../crashpad/util/linux/ptrace_broker.cc | 4 +- - .../crashpad/crashpad/util/linux/ptracer.cc | 61 +++++ - .../crashpad/util/linux/thread_info.h | 55 +++++ - .../crashpad/util/misc/capture_context.h | 1 + - .../util/misc/capture_context_linux.S | 212 +++++++++++++++++- - .../util/misc/capture_context_test.cc | 2 +- - .../misc/capture_context_test_util_linux.cc | 6 + - .../crashpad/util/posix/signals_test.cc | 12 +- - third_party/dav1d/BUILD.gn | 17 ++ - third_party/dav1d/config/linux/ppc64/config.h | 35 +++ - third_party/libvpx/BUILD.gn | 4 + - third_party/lss/linux_syscall_support.h | 4 +- - third_party/pffft/src/pffft.c | 1 + - third_party/skia/src/sksl/SkSLString.cpp | 7 +- - third_party/sqlite/amalgamation/sqlite3.c | 3 +- - third_party/sqlite/patched/ext/rtree/rtree.c | 2 +- - third_party/sqlite/patched/src/sqliteInt.h | 3 +- - .../sqlite-src-3290000/ext/rtree/rtree.c | 2 +- - .../sqlite/sqlite-src-3290000/src/sqliteInt.h | 3 +- - third_party/swiftshader/src/Yarn/BUILD.gn | 3 + - .../swiftshader/src/Yarn/OSFiber_asm.hpp | 2 + - .../swiftshader/src/Yarn/OSFiber_asm_ppc64.S | 196 ++++++++++++++++ - .../swiftshader/src/Yarn/OSFiber_asm_ppc64.h | 133 +++++++++++ - .../swiftshader/src/Yarn/OSFiber_ppc64.c | 42 ++++ - .../modules/desktop_capture/differ_block.cc | 10 +- - third_party/webrtc/rtc_base/system/arch.h | 12 + - ui/gl/BUILD.gn | 3 +- - v8/BUILD.gn | 6 + - v8/test/BUILD.gn | 6 +- - 104 files changed, 1941 insertions(+), 138 deletions(-) - create mode 100644 sandbox/linux/system_headers/ppc64_linux_syscalls.h - create mode 100644 sandbox/linux/system_headers/ppc64_linux_ucontext.h - create mode 100755 script/list_patch_targets.py - create mode 100644 third_party/dav1d/config/linux/ppc64/config.h - create mode 100644 third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.S - create mode 100644 third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.h - create mode 100644 third_party/swiftshader/src/Yarn/OSFiber_ppc64.c - -diff --git a/build/download_nacl_toolchains.py b/build/download_nacl_toolchains.py -index 286a92a27e..ec36a85d31 100755 ---- a/build/download_nacl_toolchains.py -+++ b/build/download_nacl_toolchains.py -@@ -13,6 +13,10 @@ import sys - - - def Main(args): -+ # If `disable_nacl=1` is in GYP_DEFINES, exit -+ if 'disable_nacl=1' in os.environ.get('GYP_DEFINES', ''): -+ return 0 -+ - script_dir = os.path.dirname(os.path.abspath(__file__)) - src_dir = os.path.dirname(script_dir) - nacl_dir = os.path.join(src_dir, 'native_client') -diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn -index 709552f186..c3cbed6a84 100644 ---- a/chrome/installer/linux/BUILD.gn -+++ b/chrome/installer/linux/BUILD.gn -@@ -62,8 +62,6 @@ packaging_files = packaging_files_binaries + [ - "$root_out_dir/xdg-mime", - "$root_out_dir/xdg-settings", - "$root_out_dir/locales/en-US.pak", -- "$root_out_dir/MEIPreload/manifest.json", -- "$root_out_dir/MEIPreload/preloaded_data.pb", - ] - - action_foreach("calculate_deb_dependencies") { -@@ -350,7 +348,6 @@ group("installer_deps") { - ":theme_files", - "//chrome", - "//chrome:packed_resources", -- "//chrome/browser/resources/media/mei_preload:component", - "//sandbox/linux:chrome_sandbox", - ] - if (enable_nacl) { -diff --git a/sandbox/features.gni b/sandbox/features.gni -index 89693c54c4..6017c7eea9 100644 ---- a/sandbox/features.gni -+++ b/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" || current_cpu == "ppc64") - - use_seccomp_bpf = use_seccomp_bpf || is_nacl_nonsfi -diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn -index e4615c0fee..1b021a8720 100644 ---- a/sandbox/linux/BUILD.gn -+++ b/sandbox/linux/BUILD.gn -@@ -419,6 +419,8 @@ component("sandbox_services") { - - source_set("sandbox_services_headers") { - sources = [ -+ "system_headers/ppc64_linux_syscalls.h", -+ "system_headers/ppc64_linux_ucontext.h", - "system_headers/arm64_linux_syscalls.h", - "system_headers/arm_linux_syscalls.h", - "system_headers/arm_linux_ucontext.h", -diff --git a/sandbox/linux/bpf_dsl/linux_syscall_ranges.h b/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -index 73c26c4ba6..e312589dcd 100644 ---- a/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -+++ b/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -@@ -55,6 +55,13 @@ - #define MAX_PUBLIC_SYSCALL 279u - #define MAX_SYSCALL MAX_PUBLIC_SYSCALL - -+#elif defined(__powerpc64__) -+ -+#include -+#define MIN_SYSCALL 0u -+#define MAX_PUBLIC_SYSCALL 386u -+#define MAX_SYSCALL MAX_PUBLIC_SYSCALL -+ - #else - #error "Unsupported architecture" - #endif -diff --git a/sandbox/linux/bpf_dsl/seccomp_macros.h b/sandbox/linux/bpf_dsl/seccomp_macros.h -index 1a407b9523..a6aec544e0 100644 ---- a/sandbox/linux/bpf_dsl/seccomp_macros.h -+++ b/sandbox/linux/bpf_dsl/seccomp_macros.h -@@ -16,6 +16,9 @@ - #if defined(__mips__) - // sys/user.h in eglibc misses size_t definition - #include -+#elif defined(__powerpc64__) -+// Manually define greg_t on ppc64 -+typedef unsigned long long greg_t; - #endif - #endif - -@@ -346,6 +349,51 @@ struct regs_struct { - #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] - #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] - #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5] -+ -+#elif defined(__powerpc64__) -+#include -+ -+typedef struct pt_regs regs_struct; -+ -+#ifdef ARCH_CPU_LITTLE_ENDIAN -+#define SECCOMP_ARCH AUDIT_ARCH_PPC64LE -+#else -+#define SECCOMP_ARCH AUDIT_ARCH_PPC64 -+#endif -+ -+#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg]) -+ -+#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3) -+#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0) -+#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip -+#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3) -+#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4) -+#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5) -+#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 6) -+#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 7) -+#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 8) -+ -+#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr)) -+#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch)) -+#define SECCOMP_IP_MSB_IDX \ -+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4) -+#define SECCOMP_IP_LSB_IDX \ -+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0) -+#define SECCOMP_ARG_MSB_IDX(nr) \ -+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4) -+#define SECCOMP_ARG_LSB_IDX(nr) \ -+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0) -+ -+#define SECCOMP_PT_RESULT(_regs) (_regs).gpr[3] -+#define SECCOMP_PT_SYSCALL(_regs) (_regs).gpr[0] -+#define SECCOMP_PT_IP(_regs) (_regs).nip -+#define SECCOMP_PT_PARM1(_regs) (_regs).gpr[3] -+#define SECCOMP_PT_PARM2(_regs) (_regs).gpr[4] -+#define SECCOMP_PT_PARM3(_regs) (_regs).gpr[5] -+#define SECCOMP_PT_PARM4(_regs) (_regs).gpr[6] -+#define SECCOMP_PT_PARM5(_regs) (_regs).gpr[7] -+#define SECCOMP_PT_PARM6(_regs) (_regs).gpr[8] -+ - #else - #error Unsupported target platform - -diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -index 806d13c1a8..f7f59621a3 100644 ---- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -@@ -88,7 +88,8 @@ bool IsBaselinePolicyWatched(int sysno) { - SyscallSets::IsPrctl(sysno) || - SyscallSets::IsProcessGroupOrSession(sysno) || - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - SyscallSets::IsSocketCall(sysno) || - #endif - #if defined(__arm__) -@@ -210,7 +211,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, - } - - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - if (sysno == __NR_mmap) - return RestrictMmapFlags(); - #endif -@@ -228,7 +229,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, - return RestrictPrctl(); - - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - if (sysno == __NR_socketpair) { - // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen. - static_assert(AF_UNIX == PF_UNIX, -@@ -268,7 +269,8 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, - } - - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - if (SyscallSets::IsSocketCall(sysno)) - return RestrictSocketcallCommand(); - #endif -diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc -index 060181bd42..5b5b7913b5 100644 ---- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc -+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc -@@ -290,8 +290,10 @@ TEST_BASELINE_SIGSYS(__NR_timer_create) - #if !defined(__aarch64__) - TEST_BASELINE_SIGSYS(__NR_eventfd) - TEST_BASELINE_SIGSYS(__NR_inotify_init) -+#if !defined(__powerpc64__) - TEST_BASELINE_SIGSYS(__NR_vserver) - #endif -+#endif - - #if defined(LIBC_GLIBC) && !defined(OS_CHROMEOS) - BPF_TEST_C(BaselinePolicy, FutexEINVAL, BaselinePolicy) { -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -index 348ab6e8c5..f3555ba3bd 100644 ---- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -@@ -36,7 +36,8 @@ - #include - #include - #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(__arm__) && \ -- !defined(__aarch64__) && !defined(PTRACE_GET_THREAD_AREA) -+ !defined(__aarch64__) && !defined(PTRACE_GET_THREAD_AREA) && \ -+ !defined(__powerpc64__) - // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance - // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA. - // asm/ptrace-abi.h doesn't exist on arm32 and PTRACE_GET_THREAD_AREA isn't -@@ -45,6 +46,11 @@ - #endif - #endif // !OS_NACL_NONSFI - -+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h -+#ifdef __powerpc64__ -+#include -+#endif -+ - #if defined(OS_ANDROID) - - #if !defined(F_DUPFD_CLOEXEC) -@@ -107,6 +113,15 @@ inline bool IsArchitectureMips() { - #endif - } - -+inline bool IsArchitecturePPC64() { -+#if defined(__powerpc64__) -+ return true; -+#else -+ return false; -+#endif -+} -+ -+ - // Ubuntu's version of glibc has a race condition in sem_post that can cause - // it to call futex(2) with bogus op arguments. To workaround this, we need - // to allow those futex(2) calls to fail with EINVAL, instead of crashing the -@@ -248,6 +263,8 @@ ResultExpr RestrictFcntlCommands() { - uint64_t kOLargeFileFlag = O_LARGEFILE; - if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips()) - kOLargeFileFlag = 0100000; -+ else if (IsArchitecturePPC64()) -+ kOLargeFileFlag = 0200000; - - const Arg cmd(1); - const Arg long_arg(2); -@@ -262,14 +279,23 @@ ResultExpr RestrictFcntlCommands() { - F_SETLKW, - F_GETLK, - F_DUPFD, -- F_DUPFD_CLOEXEC), -- Allow()) -+ F_DUPFD_CLOEXEC -+#if defined(__powerpc64__) -+// On PPC64, F_SETLK, F_GETLK, F_SETLKW are defined as the 64-bit variants -+// but glibc will sometimes still use the 32-bit versions. Allow both. -+ , -+ 5, /* F_GETLK (32) */ -+ 6, /* F_SETLK (32) */ -+ 7 /* F_SETLKW (32) */ -+#endif -+ ), -+ Allow()) - .Case(F_SETFL, - If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS())) - .Default(CrashSIGSYS()); - } - --#if defined(__i386__) || defined(__mips__) -+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__) - ResultExpr RestrictSocketcallCommand() { - // Unfortunately, we are unable to restrict the first parameter to - // socketpair(2). Whilst initially sounding bad, it's noteworthy that very -@@ -410,7 +436,7 @@ ResultExpr RestrictPrlimit(pid_t target_pid) { - ResultExpr RestrictPtrace() { - const Arg request(0); - return Switch(request).CASES(( --#if !defined(__aarch64__) -+#if !defined(__aarch64__) && !defined(__powerpc64__) - PTRACE_GETREGS, - PTRACE_GETFPREGS, - PTRACE_GET_THREAD_AREA, -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h -index cb563dfc55..2b17800d4f 100644 ---- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h -+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h -@@ -48,7 +48,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictMprotectFlags(); - // O_NONBLOCK | O_SYNC | O_LARGEFILE | O_CLOEXEC | O_NOATIME. - SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictFcntlCommands(); - --#if defined(__i386__) || defined(__mips__) -+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__) - // Restrict socketcall(2) to only allow socketpair(2), send(2), recv(2), - // sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2). - SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand(); -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index 816c0d63de..70a5873434 100644 ---- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -29,7 +29,8 @@ bool SyscallSets::IsAllowedGettime(int sysno) { - switch (sysno) { - case __NR_gettimeofday: - #if defined(__i386__) || defined(__x86_64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_time: - #endif - return true; -@@ -40,12 +41,14 @@ bool SyscallSets::IsAllowedGettime(int sysno) { - case __NR_clock_nanosleep: // Could be allowed. - case __NR_clock_settime: // Privileged. - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_ftime: // Obsolete. - #endif - case __NR_settimeofday: // Privileged. - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_stime: - #endif - default: -@@ -111,7 +114,7 @@ bool SyscallSets::IsFileSystem(int sysno) { - case __NR_faccessat: // EPERM not a valid errno. - case __NR_fchmodat: - case __NR_fchownat: // Should be called chownat ? --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) - case __NR_newfstatat: // fstatat(). EPERM not a valid errno. - #elif defined(__i386__) || defined(__arm__) || \ - (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -@@ -130,7 +133,7 @@ bool SyscallSets::IsFileSystem(int sysno) { - case __NR_memfd_create: - case __NR_mkdirat: - case __NR_mknodat: --#if defined(__i386__) -+#if defined(__i386__) || defined(__powerpc64__) - case __NR_oldlstat: - case __NR_oldstat: - #endif -@@ -144,7 +147,8 @@ bool SyscallSets::IsFileSystem(int sysno) { - #endif - case __NR_statfs: // EPERM not a valid errno. - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_statfs64: - #endif - case __NR_symlinkat: -@@ -154,7 +158,8 @@ bool SyscallSets::IsFileSystem(int sysno) { - case __NR_truncate64: - #endif - case __NR_unlinkat: --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_utime: - #endif - case __NR_utimensat: // New. -@@ -173,7 +178,8 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { - #endif - return true; - // TODO(jln): these should be denied gracefully as well (moved below). --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_fadvise64: // EPERM not a valid errno. - #endif - #if defined(__i386__) -@@ -186,11 +192,12 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { - case __NR_flock: // EPERM not a valid errno. - case __NR_fstatfs: // Give information about the whole filesystem. - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_fstatfs64: - #endif - case __NR_fsync: // EPERM not a valid errno. --#if defined(__i386__) -+#if defined(__i386__) || defined(__powerpc64__) - case __NR_oldfstat: - #endif - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -@@ -198,6 +205,8 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { - case __NR_sync_file_range: // EPERM not a valid errno. - #elif defined(__arm__) - case __NR_arm_sync_file_range: // EPERM not a valid errno. -+#elif defined(__powerpc64__) -+ case __NR_sync_file_range2: // EPERM not a valid errno. - #endif - default: - return false; -@@ -223,7 +232,8 @@ bool SyscallSets::IsDeniedFileSystemAccessViaFd(int sysno) { - #endif - case __NR_getdents64: // EPERM not a valid errno. - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_readdir: - #endif - return true; -@@ -264,7 +274,7 @@ bool SyscallSets::IsGetSimpleId(int sysno) { - bool SyscallSets::IsProcessPrivilegeChange(int sysno) { - switch (sysno) { - case __NR_capset: --#if defined(__i386__) || defined(__x86_64__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__) - case __NR_ioperm: // Intel privilege. - case __NR_iopl: // Intel privilege. - #endif -@@ -315,7 +325,8 @@ bool SyscallSets::IsAllowedSignalHandling(int sysno) { - case __NR_rt_sigreturn: - case __NR_rt_sigtimedwait: - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_sigaction: - case __NR_sigprocmask: - case __NR_sigreturn: -@@ -331,7 +342,8 @@ bool SyscallSets::IsAllowedSignalHandling(int sysno) { - #endif - case __NR_signalfd4: - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_sigpending: - case __NR_sigsuspend: - #endif -@@ -355,7 +367,7 @@ bool SyscallSets::IsAllowedOperationOnFd(int sysno) { - #endif - case __NR_dup3: - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_shutdown: - #endif - return true; -@@ -388,7 +400,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { - case __NR_exit_group: - case __NR_wait4: - case __NR_waitid: --#if defined(__i386__) -+#if defined(__i386__) || defined(__powerpc64__) - case __NR_waitpid: - #endif - return true; -@@ -405,7 +417,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { - #endif - case __NR_set_tid_address: - case __NR_unshare: --#if !defined(__mips__) && !defined(__aarch64__) -+#if !defined(__mips__) && !defined(__aarch64__) || defined(__powerpc64__) - case __NR_vfork: - #endif - default: -@@ -454,7 +466,7 @@ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { - return true; - default: - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_socketpair: // We will want to inspect its argument. - #endif - return false; -@@ -464,7 +476,7 @@ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { - bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { - switch (sysno) { - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_accept: - case __NR_accept4: - case __NR_bind: -@@ -479,7 +491,8 @@ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { - } - - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - // Big multiplexing system call for sockets. - bool SyscallSets::IsSocketCall(int sysno) { - switch (sysno) { -@@ -493,7 +506,8 @@ bool SyscallSets::IsSocketCall(int sysno) { - } - #endif - --#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) -+#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -+ defined(__powerpc64__) - bool SyscallSets::IsNetworkSocketInformation(int sysno) { - switch (sysno) { - case __NR_getpeername: -@@ -518,7 +532,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { - case __NR_mincore: - case __NR_mlockall: - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_mmap: - #endif - #if defined(__i386__) || defined(__arm__) || \ -@@ -548,7 +562,8 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { - switch (sysno) { - case __NR_lseek: - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR__llseek: - #endif - #if !defined(__aarch64__) -@@ -560,26 +575,28 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { - case __NR_readv: - case __NR_pread64: - #if defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_recv: - #endif - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_recvfrom: // Could specify source. - case __NR_recvmsg: // Could specify source. - #endif --#if defined(__i386__) || defined(__x86_64__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__) - case __NR_select: - #endif --#if defined(__i386__) || defined(__arm__) || defined(__mips__) -+#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__powerpc64__) - case __NR__newselect: - #endif - #if defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_send: - #endif - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_sendmsg: // Could specify destination. - case __NR_sendto: // Could specify destination. - #endif -@@ -636,7 +653,8 @@ bool SyscallSets::IsAllowedBasicScheduler(int sysno) { - return true; - case __NR_getpriority: - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_nice: - #endif - case __NR_setpriority: -@@ -648,7 +666,8 @@ bool SyscallSets::IsAllowedBasicScheduler(int sysno) { - bool SyscallSets::IsAdminOperation(int sysno) { - switch (sysno) { - #if defined(__i386__) || defined(__arm__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_bdflush: - #endif - case __NR_kexec_load: -@@ -664,7 +683,8 @@ bool SyscallSets::IsAdminOperation(int sysno) { - - bool SyscallSets::IsKernelModule(int sysno) { - switch (sysno) { --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_create_module: - case __NR_get_kernel_syms: // Should ENOSYS. - case __NR_query_module: -@@ -697,7 +717,8 @@ bool SyscallSets::IsFsControl(int sysno) { - case __NR_swapoff: - case __NR_swapon: - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_umount: - #endif - case __NR_umount2: -@@ -713,7 +734,7 @@ bool SyscallSets::IsNuma(int sysno) { - case __NR_getcpu: - case __NR_mbind: - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_migrate_pages: - #endif - case __NR_move_pages: -@@ -742,14 +763,15 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) { - switch (sysno) { - case __NR_acct: // Privileged. - #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - case __NR_getrlimit: - #endif --#if defined(__i386__) || defined(__arm__) -+#if defined(__i386__) || defined(__arm__) || defined(__powerpc64__) - case __NR_ugetrlimit: - #endif - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_ulimit: - #endif - case __NR_getrusage: -@@ -783,7 +805,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) { - #endif - case __NR_sysinfo: - case __NR_uname: --#if defined(__i386__) -+#if defined(__i386__) || defined(__powerpc64__) - case __NR_olduname: - case __NR_oldolduname: - #endif -@@ -845,8 +867,17 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) { - } - #endif - -+/* shitty hack around Void's 4.19 kernel headers missing those numbers */ -+#if defined(__powerpc64__) && !defined(__NR_shmget) -+#define __NR_shmget 395 -+#define __NR_shmctl 396 -+#define __NR_shmat 397 -+#define __NR_shmdt 398 -+#endif -+ - #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ -+ defined(__powerpc64__) - // These give a lot of ambient authority and bypass the setuid sandbox. - bool SyscallSets::IsSystemVSharedMemory(int sysno) { - switch (sysno) { -@@ -877,7 +908,8 @@ bool SyscallSets::IsSystemVMessageQueue(int sysno) { - #endif - - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - // Big system V multiplexing system call. - bool SyscallSets::IsSystemVIpc(int sysno) { - switch (sysno) { -@@ -897,7 +929,8 @@ bool SyscallSets::IsAnySystemV(int sysno) { - return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) || - IsSystemVSharedMemory(sysno); - #elif defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - return IsSystemVIpc(sysno); - #endif - } -@@ -950,7 +983,8 @@ bool SyscallSets::IsFaNotify(int sysno) { - bool SyscallSets::IsTimer(int sysno) { - switch (sysno) { - case __NR_getitimer: --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_alarm: - #endif - case __NR_setitimer: -@@ -1009,18 +1043,22 @@ bool SyscallSets::IsMisc(int sysno) { - case __NR_syncfs: - case __NR_vhangup: - // The system calls below are not implemented. --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_afs_syscall: - #endif - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_break: - #endif --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_getpmsg: - #endif - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_gtty: - case __NR_idle: - case __NR_lock: -@@ -1028,20 +1066,22 @@ bool SyscallSets::IsMisc(int sysno) { - case __NR_prof: - case __NR_profil: - #endif --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ -+ defined(__powerpc64__) - case __NR_putpmsg: - #endif - #if defined(__x86_64__) - case __NR_security: - #endif - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - case __NR_stty: - #endif --#if defined(__x86_64__) -+#if defined(__x86_64__) || defined(__powerpc64__) - case __NR_tuxcall: - #endif --#if !defined(__aarch64__) -+#if !defined(__aarch64__) && !defined(__powerpc64__) - case __NR_vserver: - #endif - return true; -diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -index acd92da395..3412873d07 100644 ---- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -@@ -43,13 +43,14 @@ class SANDBOX_EXPORT SyscallSets { - static bool IsDeniedGetOrModifySocket(int sysno); - - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - // Big multiplexing system call for sockets. - static bool IsSocketCall(int sysno); - #endif - - #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - static bool IsNetworkSocketInformation(int sysno); - #endif - -@@ -76,7 +77,8 @@ class SANDBOX_EXPORT SyscallSets { - static bool IsSystemVSemaphores(int sysno); - #endif - #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ -+ defined(__powerpc64__) - // These give a lot of ambient authority and bypass the setuid sandbox. - static bool IsSystemVSharedMemory(int sysno); - #endif -@@ -87,7 +89,8 @@ class SANDBOX_EXPORT SyscallSets { - #endif - - #if defined(__i386__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \ -+ defined(__powerpc64__) - // Big system V multiplexing system call. - static bool IsSystemVIpc(int sysno); - #endif -diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc -index 34edabd2b8..10fa5fd070 100644 ---- a/sandbox/linux/seccomp-bpf/syscall.cc -+++ b/sandbox/linux/seccomp-bpf/syscall.cc -@@ -16,7 +16,7 @@ namespace sandbox { - namespace { - - #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ -- defined(ARCH_CPU_MIPS_FAMILY) -+ defined(ARCH_CPU_MIPS_FAMILY) || defined (ARCH_CPU_PPC64_FAMILY) - // Number that's not currently used by any Linux kernel ABIs. - const int kInvalidSyscallNumber = 0x351d3; - #else -@@ -308,12 +308,56 @@ asm(// We need to be able to tell the kernel exactly where we made a - // Enter the kernel - "svc 0\n" - "2:ret\n" -+ ".cfi_endproc\n" -+ ".size SyscallAsm, .-SyscallAsm\n" -+#elif defined(__powerpc64__) -+ ".text\n" -+ ".align 4\n" -+ ".type SyscallAsm @function\n" -+ "SyscallAsm:\n" -+ ".cfi_startproc\n" -+ -+ // Check if r3 is negative -+ "cmpdi 3, 0\n" -+ "bgt 2f\n" -+ -+ // Load address of 3f into r3 and return -+ "mflr 10\n" -+ "bl 1f\n" -+ "1: mflr 3\n" -+ "mtlr 10\n" -+ "addi 3, 3, 4*13\n" -+ "blr\n" -+ -+ // Load arguments from array into r3-8 -+ // save param 3 in r10 -+ "2:\n" -+ "mr 0, 3\n" -+ "ld 3, 0(4)\n" -+ "ld 5, 16(4)\n" -+ "ld 6, 24(4)\n" -+ "ld 7, 32(4)\n" -+ "ld 8, 40(4)\n" -+ "ld 4, 8(4)\n" -+ "li 9, 0\n" -+ -+ // Enter kernel -+ "sc\n" -+ -+ // Magic return address -+ "3:\n" -+ // Like MIPS, ppc64 return values are always positive. -+ // Check for error in cr0.SO and negate upon error -+ "bc 4, 3, 4f\n" -+ "neg 3, 3\n" -+ "4: blr\n" -+ - ".cfi_endproc\n" - ".size SyscallAsm, .-SyscallAsm\n" - #endif - ); // asm - --#if defined(__x86_64__) -+#if defined(__x86_64__) || defined(__powerpc64__) - extern "C" { - intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]); - } -@@ -427,6 +471,8 @@ intptr_t Syscall::Call(int nr, - ret = inout; - } - -+#elif defined(__powerpc64__) -+ intptr_t ret = SyscallAsm(nr, args); - #else - #error "Unimplemented architecture" - #endif -@@ -443,8 +489,18 @@ void Syscall::PutValueInUcontext(intptr_t ret_val, ucontext_t* ctx) { - // needs to be changed back. - ret_val = -ret_val; - SECCOMP_PARM4(ctx) = 1; -- } else -+ } else { - SECCOMP_PARM4(ctx) = 0; -+ } -+#endif -+#if defined(__powerpc64__) -+ // Same as MIPS, need to invert ret and set error register (cr0.SO) -+ if (ret_val <= -1 && ret_val >= -4095) { -+ ret_val = -ret_val; -+ ctx->uc_mcontext.regs->ccr |= (1 << 28); -+ } else { -+ ctx->uc_mcontext.regs->ccr &= ~(1 << 28); -+ } - #endif - SECCOMP_RESULT(ctx) = static_cast(ret_val); - } -diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc -index 003708d2c8..8f9b3af4e2 100644 ---- a/sandbox/linux/seccomp-bpf/trap.cc -+++ b/sandbox/linux/seccomp-bpf/trap.cc -@@ -225,6 +225,20 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { - SetIsInSigHandler(); - } - -+#if defined(__powerpc64__) -+ // On ppc64+glibc, some syscalls seem to accidentally negate the first -+ // parameter which causes checks against it to fail. For now, manually -+ // negate them back. -+ // TODO(shawn@anastas.io): investigate this issue further -+ auto nr = SECCOMP_SYSCALL(ctx); -+ if (nr == __NR_openat || nr == __NR_mkdirat || nr == __NR_faccessat || nr == __NR_readlinkat || -+ nr == __NR_renameat || nr == __NR_renameat2 || nr == __NR_newfstatat || nr == __NR_unlinkat) { -+ if (static_cast(SECCOMP_PARM1(ctx)) > 0) { -+ SECCOMP_PARM1(ctx) = -SECCOMP_PARM1(ctx); -+ } -+ } -+#endif -+ - // Copy the seccomp-specific data into a arch_seccomp_data structure. This - // is what we are showing to TrapFnc callbacks that the system call - // evaluator registered with the sandbox. -diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc -index 542567f3ee..31d493c264 100644 ---- a/sandbox/linux/services/credentials.cc -+++ b/sandbox/linux/services/credentials.cc -@@ -79,7 +79,7 @@ bool ChrootToSafeEmptyDir() { - pid_t pid = -1; - alignas(16) char stack_buf[PTHREAD_STACK_MIN]; - #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ -- defined(ARCH_CPU_MIPS_FAMILY) -+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY) - // The stack grows downward. - void* stack = stack_buf + sizeof(stack_buf); - #else -diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc -index fcfd2aa129..f6eb32fb76 100644 ---- a/sandbox/linux/services/syscall_wrappers.cc -+++ b/sandbox/linux/services/syscall_wrappers.cc -@@ -58,7 +58,7 @@ long sys_clone(unsigned long flags, - #if defined(ARCH_CPU_X86_64) - return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls); - #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \ -- defined(ARCH_CPU_MIPS_FAMILY) -+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY) - // CONFIG_CLONE_BACKWARDS defined. - return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid); - #endif -diff --git a/sandbox/linux/syscall_broker/broker_process.cc b/sandbox/linux/syscall_broker/broker_process.cc -index 56d4964cfd..a2e94eada5 100644 ---- a/sandbox/linux/syscall_broker/broker_process.cc -+++ b/sandbox/linux/syscall_broker/broker_process.cc -@@ -151,7 +151,7 @@ bool BrokerProcess::IsSyscallAllowed(int sysno) const { - #if defined(__NR_fstatat) - case __NR_fstatat: - #endif --#if defined(__x86_64__) || defined(__aarch64__) -+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__) - case __NR_newfstatat: - #endif - return !fast_check_in_client_ || allowed_command_set_.test(COMMAND_STAT); -diff --git a/sandbox/linux/system_headers/linux_seccomp.h b/sandbox/linux/system_headers/linux_seccomp.h -index a60fe2ad3d..9dccdb51d0 100644 ---- a/sandbox/linux/system_headers/linux_seccomp.h -+++ b/sandbox/linux/system_headers/linux_seccomp.h -@@ -29,6 +29,9 @@ - #ifndef EM_AARCH64 - #define EM_AARCH64 183 - #endif -+#ifndef EM_PPC64 -+#define EM_PPC64 21 -+#endif - - #ifndef __AUDIT_ARCH_64BIT - #define __AUDIT_ARCH_64BIT 0x80000000 -@@ -54,6 +57,12 @@ - #ifndef AUDIT_ARCH_AARCH64 - #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) - #endif -+#ifndef AUDIT_ARCH_PPC64 -+#define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT) -+#endif -+#ifndef AUDIT_ARCH_PPC64LE -+#define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) -+#endif - - // For prctl.h - #ifndef PR_SET_SECCOMP -diff --git a/sandbox/linux/system_headers/linux_signal.h b/sandbox/linux/system_headers/linux_signal.h -index f5a7367617..515b21a5fd 100644 ---- a/sandbox/linux/system_headers/linux_signal.h -+++ b/sandbox/linux/system_headers/linux_signal.h -@@ -13,7 +13,7 @@ - // (not undefined, but defined different values and in different memory - // layouts). So, fill the gap here. - #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ -- defined(__aarch64__) -+ defined(__aarch64__) || defined(__powerpc64__) - - #define LINUX_SIGHUP 1 - #define LINUX_SIGINT 2 -diff --git a/sandbox/linux/system_headers/linux_syscalls.h b/sandbox/linux/system_headers/linux_syscalls.h -index 2b78a0cc3b..0a70f5ea58 100644 ---- a/sandbox/linux/system_headers/linux_syscalls.h -+++ b/sandbox/linux/system_headers/linux_syscalls.h -@@ -35,5 +35,9 @@ - #include "sandbox/linux/system_headers/arm64_linux_syscalls.h" - #endif - -+#if defined(__powerpc64__) -+#include "sandbox/linux/system_headers/ppc64_linux_syscalls.h" -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ - -diff --git a/sandbox/linux/system_headers/linux_ucontext.h b/sandbox/linux/system_headers/linux_ucontext.h -index 22ce780274..a69b024c2f 100644 ---- a/sandbox/linux/system_headers/linux_ucontext.h -+++ b/sandbox/linux/system_headers/linux_ucontext.h -@@ -11,6 +11,8 @@ - #include "sandbox/linux/system_headers/arm_linux_ucontext.h" - #elif defined(__i386__) - #include "sandbox/linux/system_headers/i386_linux_ucontext.h" -+#elif defined(__powerpc64__) -+#include "sandbox/linux/system_headers/ppc64_linux_ucontext.h" - #else - #error "No support for your architecture in PNaCl header" - #endif -diff --git a/sandbox/linux/system_headers/ppc64_linux_syscalls.h b/sandbox/linux/system_headers/ppc64_linux_syscalls.h -new file mode 100644 -index 0000000000..ccacffe22e ---- /dev/null -+++ b/sandbox/linux/system_headers/ppc64_linux_syscalls.h -@@ -0,0 +1,12 @@ -+// 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. -+ -+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_ -+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_ -+ -+#include -+ -+//TODO: is it necessary to redefine syscall numbers for PPC64? -+ -+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_ -diff --git a/sandbox/linux/system_headers/ppc64_linux_ucontext.h b/sandbox/linux/system_headers/ppc64_linux_ucontext.h -new file mode 100644 -index 0000000000..07728e0879 ---- /dev/null -+++ b/sandbox/linux/system_headers/ppc64_linux_ucontext.h -@@ -0,0 +1,12 @@ -+// 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. -+ -+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ -+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ -+ -+#include -+ -+//TODO: is it necessary to redefine ucontext on PPC64? -+ -+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_ -diff --git a/script/list_patch_targets.py b/script/list_patch_targets.py -new file mode 100755 -index 0000000000..55173bac99 ---- /dev/null -+++ b/script/list_patch_targets.py -@@ -0,0 +1,23 @@ -+#!/usr/bin/env python -+ -+import argparse -+import json -+ -+ -+def parse_args(): -+ parser = argparse.ArgumentParser(description='Apply Electron patches') -+ parser.add_argument('config', nargs='+', -+ type=argparse.FileType('r'), -+ help='patches\' config(s) in the JSON format') -+ return parser.parse_args() -+ -+ -+def main(): -+ configs = parse_args().config -+ for config_json in configs: -+ for patch_dir, repo in json.load(config_json).iteritems(): -+ print(repo) -+ -+ -+if __name__ == '__main__': -+ main() -diff --git a/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc b/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -index 017f13cf7b..a76e579b7b 100644 ---- a/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -+++ b/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -@@ -15,6 +15,11 @@ - #include "sandbox/linux/system_headers/linux_syscalls.h" - #include "services/service_manager/sandbox/linux/sandbox_linux.h" - -+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h -+#ifdef __powerpc64__ -+#include -+#endif -+ - // TODO(vignatti): replace the local definitions below with #include - // once kernel version 4.6 becomes widely used. - #include -diff --git a/third_party/angle/src/compiler/translator/InfoSink.h b/third_party/angle/src/compiler/translator/InfoSink.h -index 3a807e1e3d..5258617a7e 100644 ---- a/third_party/angle/src/compiler/translator/InfoSink.h -+++ b/third_party/angle/src/compiler/translator/InfoSink.h -@@ -92,7 +92,16 @@ class TInfoSinkBase - stream.precision(8); - stream << f; - } -- sink.append(stream.str()); -+ -+ // Hack to work around a bug where negative floating point values -+ // are rendered like '.0.5' instead of '-0.5' -+ std::string res(stream.str()); -+ -+ if (signbit(f)) { // test if f is negative -+ res[0] = '-'; -+ } -+ -+ sink.append(res); - return *this; - } - // Write boolean values as their names instead of integral value. -diff --git a/third_party/angle/src/libANGLE/Constants.h b/third_party/angle/src/libANGLE/Constants.h -index 5a2f9875d7..47e66f2262 100644 ---- a/third_party/angle/src/libANGLE/Constants.h -+++ b/third_party/angle/src/libANGLE/Constants.h -@@ -9,6 +9,7 @@ - #ifndef LIBANGLE_CONSTANTS_H_ - #define LIBANGLE_CONSTANTS_H_ - -+#include - #include "common/platform.h" - - #include -diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 250ed85424..c75f4e0c21 100644 ---- a/third_party/boringssl/BUILD.gn -+++ b/third_party/boringssl/BUILD.gn -@@ -103,6 +103,13 @@ if (is_win && !is_msan && current_cpu != "arm64") { - } else { - public_configs = [ ":no_asm_config" ] - } -+ } else if (current_cpu == "ppc64") { -+ if (is_linux) { -+ # TODO: ppc64 (be) check -+ sources += crypto_sources_linux_ppc64le -+ } else { -+ public_configs = [ ":no_asm_config" ] -+ } - } else { - public_configs = [ ":no_asm_config" ] - } -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h -index 07d9171a0a..9aed4cb369 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h -@@ -44,6 +44,8 @@ typedef MDRawContextARM RawContextCPU; - typedef MDRawContextARM64_Old RawContextCPU; - #elif defined(__mips__) - typedef MDRawContextMIPS RawContextCPU; -+#elif defined(__powerpc64__) -+typedef MDRawContextPPC64 RawContextCPU; - #else - #error "This code has not been ported to your platform yet." - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -index aae1dc13b2..03afec7a58 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -@@ -270,7 +270,42 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const { - out->float_save.fir = mcontext.fpc_eir; - #endif - } --#endif // __mips__ -+ -+#elif defined(__powerpc64__) -+ -+uintptr_t ThreadInfo::GetInstructionPointer() const { -+ return mcontext.gp_regs[PT_NIP]; -+} -+ -+void ThreadInfo::FillCPUContext(RawContextCPU* out) const { -+ out->context_flags = MD_CONTEXT_PPC64_FULL; -+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++) -+ out->gpr[i] = mcontext.gp_regs[i]; -+ -+ out->lr = mcontext.gp_regs[PT_LNK]; -+ out->srr0 = mcontext.gp_regs[PT_NIP]; -+ out->srr1 = mcontext.gp_regs[PT_MSR]; -+ out->cr = mcontext.gp_regs[PT_CCR]; -+ out->xer = mcontext.gp_regs[PT_XER]; -+ out->ctr = mcontext.gp_regs[PT_CTR]; -+ -+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++) -+ out->float_save.fpregs[i] = mcontext.fp_regs[i]; -+ -+ out->float_save.fpscr = mcontext.fp_regs[NFPREG-1]; -+ -+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) -+ out->vector_save.save_vr[i] = \ -+ {(((uint64_t)vregs.vrregs[i][0]) << 32) -+ | vregs.vrregs[i][1], -+ (((uint64_t)vregs.vrregs[i][2]) << 32) -+ | vregs.vrregs[i][3]}; -+ -+ out->vrsave = vregs.vrsave; -+ out->vector_save.save_vscr = {0, vregs.vscr.vscr_word}; -+ out->vector_save.save_vrvalid = 0xFFFFFFFF; -+} -+#endif // __powerpc64__ - - void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) { - assert(gp_regs || size); -@@ -279,6 +314,11 @@ void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) { - *gp_regs = mcontext.gregs; - if (size) - *size = sizeof(mcontext.gregs); -+#elif defined(__powerpc64__) -+ if (gp_regs) -+ *gp_regs = mcontext.gp_regs; -+ if (size) -+ *size = sizeof(mcontext.gp_regs); - #else - if (gp_regs) - *gp_regs = ®s; -@@ -294,6 +334,11 @@ void ThreadInfo::GetFloatingPointRegisters(void** fp_regs, size_t* size) { - *fp_regs = &mcontext.fpregs; - if (size) - *size = sizeof(mcontext.fpregs); -+#elif defined(__powerpc64__) -+ if (fp_regs) -+ *fp_regs = &mcontext.fp_regs; -+ if (size) -+ *size = sizeof(mcontext.fp_regs); - #else - if (fp_regs) - *fp_regs = &fpregs; -@@ -302,4 +347,13 @@ void ThreadInfo::GetFloatingPointRegisters(void** fp_regs, size_t* size) { - #endif - } - -+#if defined(__powerpc64__) -+void ThreadInfo::GetVectorRegisters(void** v_regs, size_t* size) { -+ if (v_regs) -+ *v_regs = &vregs; -+ if (size) -+ *size = sizeof(vregs); -+} -+#endif -+ - } // namespace google_breakpad -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h -index fb216fa6d7..593aac8225 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h -@@ -68,6 +68,10 @@ struct ThreadInfo { - // Use the structures defined in - struct user_regs_struct regs; - struct user_fpsimd_struct fpregs; -+#elif defined(__powerpc64__) -+ // Use the structures defined in . -+ mcontext_t mcontext; -+ vrregset_t vregs; - #elif defined(__mips__) - // Use the structure defined in . - mcontext_t mcontext; -@@ -84,6 +88,11 @@ struct ThreadInfo { - - // Returns the pointer and size of float point register area. - void GetFloatingPointRegisters(void** fp_regs, size_t* size); -+ -+#if defined(__powerpc64__) -+ // Returns the pointer and size of the vector register area. (PPC64 only) -+ void GetVectorRegisters(void** v_regs, size_t* size); -+#endif - }; - - } // namespace google_breakpad -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -index 6ee6cc1e4c..44fee5ba06 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -@@ -254,6 +254,48 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { - out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused. - #endif - } -+ -+#elif defined(__powerpc64__) -+ -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { -+ return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]; -+} -+ -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { -+ return uc->uc_mcontext.gp_regs[PT_NIP]; -+} -+ -+void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc, -+ const vrregset_t* vregs) { -+ out->context_flags = MD_CONTEXT_PPC64_FULL; -+ -+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++) -+ out->gpr[i] = uc->uc_mcontext.gp_regs[i]; -+ -+ out->lr = uc->uc_mcontext.gp_regs[PT_LNK]; -+ out->srr0 = uc->uc_mcontext.gp_regs[PT_NIP]; -+ out->srr1 = uc->uc_mcontext.gp_regs[PT_MSR]; -+ out->cr = uc->uc_mcontext.gp_regs[PT_CCR]; -+ out->xer = uc->uc_mcontext.gp_regs[PT_XER]; -+ out->ctr = uc->uc_mcontext.gp_regs[PT_CTR]; -+ -+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++) -+ out->float_save.fpregs[i] = uc->uc_mcontext.fp_regs[i]; -+ -+ out->float_save.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1]; -+ -+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) -+ out->vector_save.save_vr[i] = -+ {(((uint64_t)vregs->vrregs[i][0]) << 32) -+ | vregs->vrregs[i][1], -+ (((uint64_t)vregs->vrregs[i][2]) << 32) -+ | vregs->vrregs[i][3]}; -+ -+ out->vrsave = vregs->vrsave; -+ out->vector_save.save_vscr = {0, vregs->vscr.vscr_word}; -+ out->vector_save.save_vrvalid = 0xFFFFFFFF; -+} -+ - #endif - - } // namespace google_breakpad -diff --git a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -index f830618f24..24d996380f 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -54,6 +54,9 @@ struct UContextReader { - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); -+#elif defined(__powerpc64__) -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -+ const vrregset_t* vregs); - #else - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -index b895f6d7ad..901cd68fbd 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -@@ -461,9 +461,16 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { - memcpy(&g_crash_context_.float_state, fp_ptr, - sizeof(g_crash_context_.float_state)); - } -+#elif defined(__powerpc64__) -+ // On PPC64, we must copy VR state -+ ucontext_t* uc_ptr = (ucontext_t*)uc; -+ if (uc_ptr->uc_mcontext.v_regs) { -+ memcpy(&g_crash_context_.vector_state, uc_ptr->uc_mcontext.v_regs, -+ sizeof(g_crash_context_.vector_state)); -+ } - #elif !defined(__ARM_EABI__) && !defined(__mips__) - // FP state is not part of user ABI on ARM Linux. -- // In case of MIPS Linux FP state is already part of ucontext_t -+ // In case of MIPS, Linux FP state is already part of ucontext_t - // and 'float_state' is not a member of CrashContext. - ucontext_t* uc_ptr = (ucontext_t*)uc; - if (uc_ptr->uc_mcontext.fpregs) { -@@ -701,11 +708,19 @@ bool ExceptionHandler::WriteMinidump() { - } - #endif - --#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) -+#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) \ -+ && !defined(__powerpc64__) - // FPU state is not part of ARM EABI ucontext_t. - memcpy(&context.float_state, context.context.uc_mcontext.fpregs, - sizeof(context.float_state)); - #endif -+ -+#if defined(__powerpc64__) -+ // Vector registers must be copied on PPC64 -+ memcpy(&context.vector_state, context.context.uc_mcontext.v_regs, -+ sizeof(context.vector_state)); -+#endif -+ - context.tid = sys_gettid(); - - // Add an exception stream to the minidump for better reporting. -@@ -726,6 +741,9 @@ bool ExceptionHandler::WriteMinidump() { - #elif defined(__mips__) - context.siginfo.si_addr = - reinterpret_cast(context.context.uc_mcontext.pc); -+#elif defined(__powerpc64__) -+ context.siginfo.si_addr = -+ reinterpret_cast(context.context.uc_mcontext.gp_regs[PT_NIP]); - #else - #error "This code has not been ported to your platform yet." - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h -index f44483ff0f..36ce6d6ce4 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h -+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h -@@ -192,7 +192,11 @@ class ExceptionHandler { - siginfo_t siginfo; - pid_t tid; // the crashing thread. - ucontext_t context; --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ // PPC64's FP state is a part of ucontext_t like MIPS but the vector -+ // state is not, so a struct is needed. -+ vstate_t vector_state; -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - // #ifdef this out because FP state is not part of user ABI for Linux ARM. - // In case of MIPS Linux FP state is already part of ucontext_t so - // 'float_state' is not required. -diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc -index bcbf9c26f1..2c36ed41f2 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc -@@ -307,7 +307,7 @@ TEST(ExceptionHandlerTest, ParallelChildCrashesDontHang) { - } - - // Wait a while until the child should have crashed. -- usleep(1000000); -+ usleep(2000000); - // Kill the child if it is still running. - kill(child, SIGKILL); - -@@ -559,6 +559,8 @@ const unsigned char kIllegalInstruction[] = { - #if defined(__mips__) - // mfc2 zero,Impl - usually illegal in userspace. - 0x48, 0x00, 0x00, 0x48 -+#elif defined(__powerpc64__) -+ 0x01, 0x01, 0x01, 0x01 // Crashes on a tested POWER9 cpu - #else - // This crashes with SIGILL on x86/x86-64/arm. - 0xff, 0xff, 0xff, 0xff -@@ -754,10 +756,10 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) { - - // These are defined here so the parent can use them to check the - // data from the minidump afterwards. -- // Use 4k here because the OS will hand out a single page even -+ // Use the page size here because the OS will hand out a single page even - // if a smaller size is requested, and this test wants to - // test the upper bound of the memory range. -- const uint32_t kMemorySize = 4096; // bytes -+ const uint32_t kMemorySize = getpagesize(); // bytes - const int kOffset = kMemorySize - sizeof(kIllegalInstruction); - - const pid_t child = fork(); -diff --git a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc -index fa3c1713a5..6ce709e2f0 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc -@@ -138,7 +138,9 @@ class MicrodumpWriter { - const MicrodumpExtraInfo& microdump_extra_info, - LinuxDumper* dumper) - : ucontext_(context ? &context->context : NULL), --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ vector_state_(context ? &context->vector_state : NULL), -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - float_state_(context ? &context->float_state : NULL), - #endif - dumper_(dumper), -@@ -337,6 +339,8 @@ class MicrodumpWriter { - # else - # error "This mips ABI is currently not supported (n32)" - #endif -+#elif defined(__powerpc64__) -+ const char kArch[] = "ppc64"; - #else - #error "This code has not been ported to your platform yet" - #endif -@@ -409,7 +413,9 @@ class MicrodumpWriter { - void DumpCPUState() { - RawContextCPU cpu; - my_memset(&cpu, 0, sizeof(RawContextCPU)); --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ UContextReader::FillCPUContext(&cpu, ucontext_, vector_state_); -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - UContextReader::FillCPUContext(&cpu, ucontext_, float_state_); - #else - UContextReader::FillCPUContext(&cpu, ucontext_); -@@ -605,7 +611,9 @@ class MicrodumpWriter { - void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } - - const ucontext_t* const ucontext_; --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ const google_breakpad::vstate_t* const vector_state_; -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - const google_breakpad::fpstate_t* const float_state_; - #endif - LinuxDumper* dumper_; -diff --git a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc -index c2fea0225e..8c62c524a2 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc -@@ -278,10 +278,19 @@ TEST(MicrodumpWriterTest, BasicWithMappings) { - CrashAndGetMicrodump(mappings, MicrodumpExtraInfo(), &buf); - ASSERT_TRUE(ContainsMicrodump(buf)); - -+ int page_size = getpagesize(); - #ifdef __LP64__ -- ASSERT_NE(std::string::npos, -- buf.find("M 0000000000001000 000000000000002A 0000000000001000 " -- "33221100554477668899AABBCCDDEEFF0 libfoo.so")); -+ // This test is only available for the following page sizes -+ ASSERT_TRUE((page_size == 4096) || (page_size == 65536)); -+ if (page_size == 4096) { -+ ASSERT_NE(std::string::npos, -+ buf.find("M 0000000000001000 000000000000002A 0000000000001000 " -+ "33221100554477668899AABBCCDDEEFF0 libfoo.so")); -+ } else { -+ ASSERT_NE(std::string::npos, -+ buf.find("M 0000000000010000 000000000000002A 0000000000010000 " -+ "33221100554477668899AABBCCDDEEFF0 libfoo.so")); -+ } - #else - ASSERT_NE(std::string::npos, - buf.find("M 00001000 0000002A 00001000 " -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -index 4150689839..b93e4afcff 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -@@ -112,6 +112,9 @@ bool LinuxCoreDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { - #elif defined(__mips__) - stack_pointer = - reinterpret_cast(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]); -+#elif defined(__powerpc64__) -+ stack_pointer = -+ reinterpret_cast(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]); - #else - #error "This code hasn't been ported to your platform yet." - #endif -@@ -197,7 +200,10 @@ bool LinuxCoreDumper::EnumerateThreads() { - memset(&info, 0, sizeof(ThreadInfo)); - info.tgid = status->pr_pgrp; - info.ppid = status->pr_ppid; --#if defined(__mips__) -+#if defined(__powerpc64__) -+ for (int i = 0; i < 31; i++) -+ info.mcontext.gp_regs[i] = status->pr_reg[i]; -+#elif defined(__mips__) - #if defined(__ANDROID__) - for (int i = EF_R0; i <= EF_R31; i++) - info.mcontext.gregs[i - EF_R0] = status->pr_reg[i]; -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc -index dbedecd530..f91f7f9940 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc -@@ -798,7 +798,9 @@ bool LinuxDumper::GetStackInfo(const void** stack, size_t* stack_len, - reinterpret_cast(int_stack_pointer & ~(page_size - 1)); - - // The number of bytes of stack which we try to capture. -- static const ptrdiff_t kStackToCapture = 32 * 1024; -+ // This now depends on page_size to avoid missing data -+ // on systems with larger page sizes. -+ static const ptrdiff_t kStackToCapture = 8 * page_size; - - const MappingInfo* mapping = FindMapping(stack_pointer); - if (!mapping) -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h -index f4a75d9060..020981f57e 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h -@@ -63,7 +63,8 @@ namespace google_breakpad { - (defined(__mips__) && _MIPS_SIM == _ABIO32) - typedef Elf32_auxv_t elf_aux_entry; - #elif defined(__x86_64) || defined(__aarch64__) || \ -- (defined(__mips__) && _MIPS_SIM != _ABIO32) -+ (defined(__mips__) && _MIPS_SIM != _ABIO32) || \ -+ defined(__powerpc64__) - typedef Elf64_auxv_t elf_aux_entry; - #endif - -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -index 3ad48e5015..1688c365ef 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc -@@ -51,6 +51,8 @@ - #define TID_PTR_REGISTER "rcx" - #elif defined(__mips__) - #define TID_PTR_REGISTER "$1" -+#elif defined(__powerpc64__) -+#define TID_PTR_REGISTER "r8" - #else - #error This test has not been ported to this platform. - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -index e3ddb81a65..fa28575ef5 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -@@ -149,19 +149,27 @@ bool LinuxPtraceDumper::CopyFromProcess(void* dest, pid_t child, - return true; - } - --bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) --{ -+bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) { - #ifdef PTRACE_GETREGSET - struct iovec io; - info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len); -- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) { -+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) { - return false; - } - - info->GetFloatingPointRegisters(&io.iov_base, &io.iov_len); -- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) { -+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) { - return false; - } -+ -+#if defined(__powerpc64__) -+ // Grab the vector registers on PPC64 too -+ info->GetVectorRegisters(&io.iov_base, &io.iov_len); -+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PPC_VMX, (void*)&io) == -1) { -+ return false; -+ } -+#endif // defined(__powerpc64__) -+ - return true; - #else - return false; -@@ -298,6 +306,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { - #elif defined(__mips__) - stack_pointer = - reinterpret_cast(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]); -+#elif defined(__powerpc64__) -+ stack_pointer = -+ reinterpret_cast(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]); - #else - #error "This code hasn't been ported to your platform yet." - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc -index a41dafce04..31743940de 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc -@@ -462,6 +462,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackReadWithMultipleThreads) { - #elif defined(__mips__) - pid_t* process_tid_location = - reinterpret_cast(one_thread.mcontext.gregs[1]); -+#elif defined(__powerpc64__) -+ pid_t* process_tid_location = -+ reinterpret_cast(one_thread.mcontext.gp_regs[8]); - #else - #error This test has not been ported to this platform. - #endif -@@ -559,6 +562,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeStackCopy) { - uintptr_t heap_addr = thread_info.regs.rcx; - #elif defined(__mips__) - uintptr_t heap_addr = thread_info.mcontext.gregs[1]; -+#elif defined(__powerpc64__) -+ uintptr_t heap_addr = thread_info.mcontext.gp_regs[8]; - #else - #error This test has not been ported to this platform. - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc -index f8cdf2a1c6..cb808c151f 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc -@@ -136,7 +136,9 @@ class MinidumpWriter { - : fd_(minidump_fd), - path_(minidump_path), - ucontext_(context ? &context->context : NULL), --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ vector_state_(context ? &context->vector_state : NULL), -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - float_state_(context ? &context->float_state : NULL), - #endif - dumper_(dumper), -@@ -468,7 +470,9 @@ class MinidumpWriter { - if (!cpu.Allocate()) - return false; - my_memset(cpu.get(), 0, sizeof(RawContextCPU)); --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ UContextReader::FillCPUContext(cpu.get(), ucontext_, vector_state_); -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_); - #else - UContextReader::FillCPUContext(cpu.get(), ucontext_); -@@ -897,7 +901,7 @@ class MinidumpWriter { - dirent->location.rva = 0; - } - --#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) -+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__powerpc64__) - bool WriteCPUInformation(MDRawSystemInfo* sys_info) { - char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0}; - static const char vendor_id_name[] = "vendor_id"; -@@ -917,7 +921,9 @@ class MinidumpWriter { - - // processor_architecture should always be set, do this first - sys_info->processor_architecture = --#if defined(__mips__) -+#if defined(__powerpc64__) -+ MD_CPU_ARCHITECTURE_PPC64; -+#elif defined(__mips__) - # if _MIPS_SIM == _ABIO32 - MD_CPU_ARCHITECTURE_MIPS; - # elif _MIPS_SIM == _ABI64 -@@ -1333,7 +1339,9 @@ class MinidumpWriter { - const char* path_; // Path to the file where the minidum should be written. - - const ucontext_t* const ucontext_; // also from the signal handler --#if !defined(__ARM_EABI__) && !defined(__mips__) -+#if defined(__powerpc64__) -+ const google_breakpad::vstate_t* const vector_state_; -+#elif !defined(__ARM_EABI__) && !defined(__mips__) - const google_breakpad::fpstate_t* const float_state_; // ditto - #endif - LinuxDumper* dumper_; -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -index d1dc331215..c344621df1 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -@@ -47,6 +47,8 @@ class ExceptionHandler; - - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; -+#elif defined(__powerpc64__) -+typedef vrregset_t vstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) - typedef struct _libc_fpstate fpstate_t; - #endif -diff --git a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc -index c951e69d8f..e1d6e40d67 100644 ---- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc -+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc -@@ -714,6 +714,9 @@ TEST(MinidumpWriterTest, InvalidStackPointer) { - #elif defined(__mips__) - context.context.uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP] = - invalid_stack_pointer; -+#elif defined(__powerpc64__) -+ context.context.uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP] = -+ invalid_stack_pointer; - #else - # error "This code has not been ported to your platform yet." - #endif -diff --git a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc -index 4e938269f2..f0ff15d967 100644 ---- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc -+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc -@@ -65,8 +65,7 @@ bool MemoryMappedFile::Map(const char* path, size_t offset) { - } - - #if defined(__x86_64__) || defined(__aarch64__) || \ -- (defined(__mips__) && _MIPS_SIM == _ABI64) -- -+ (defined(__mips__) && _MIPS_SIM == _ABI64) || defined(__powerpc64__) - struct kernel_stat st; - if (sys_fstat(fd, &st) == -1 || st.st_size < 0) { - #else -diff --git a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc -index fad59f40cd..616496d672 100644 ---- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc -+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc -@@ -176,9 +176,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterMap) { - TEST_F(MemoryMappedFileTest, MapWithOffset) { - // Put more data in the test file this time. Offsets can only be - // done on page boundaries, so we need a two page file to test this. -- const int page_size = 4096; -- char data1[2 * page_size]; -- size_t data1_size = sizeof(data1); -+ const int page_size = getpagesize(); -+ char *data1 = static_cast(malloc(2 * page_size)); -+ EXPECT_TRUE(data1 != NULL); -+ size_t data1_size = (2 * page_size); - for (size_t i = 0; i < data1_size; ++i) { - data1[i] = i & 0x7f; - } -diff --git a/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc b/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc -index ccc9f1459c..debaed4d6e 100644 ---- a/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc -+++ b/third_party/breakpad/breakpad/src/processor/exploitability_linux.cc -@@ -202,12 +202,14 @@ bool ExploitabilityLinux::EndedOnIllegalWrite(uint64_t instruction_ptr) { - // Check architecture and set architecture variable to corresponding flag - // in objdump. - switch (context->GetContextCPU()) { -+#if defined(__i386) || defined(__x86_64) - case MD_CONTEXT_X86: - architecture = "i386"; - break; - case MD_CONTEXT_AMD64: - architecture = "i386:x86-64"; - break; -+#endif - default: - // Unsupported architecture. Note that ARM architectures are not - // supported because objdump does not support ARM. -diff --git a/third_party/breakpad/breakpad/src/processor/exploitability_unittest.cc b/third_party/breakpad/breakpad/src/processor/exploitability_unittest.cc -index 528ee5f213..72764d6c1e 100644 ---- a/third_party/breakpad/breakpad/src/processor/exploitability_unittest.cc -+++ b/third_party/breakpad/breakpad/src/processor/exploitability_unittest.cc -@@ -104,6 +104,8 @@ ExploitabilityFor(const string& filename) { - } - - TEST(ExploitabilityTest, TestWindowsEngine) { -+// The following tests are only executable on an x86-class linux machine. -+#if !defined(_WIN32) && (defined(__i386) || defined(__x86_64)) - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - ExploitabilityFor("ascii_read_av.dmp")); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, -@@ -136,9 +138,12 @@ TEST(ExploitabilityTest, TestWindowsEngine) { - ExploitabilityFor("read_av_clobber_write.dmp")); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_LOW, - ExploitabilityFor("read_av_conditional.dmp")); -+#endif - } - - TEST(ExploitabilityTest, TestLinuxEngine) { -+// The following tests are only executable on an x86-class linux machine. -+#if defined(__i386) || defined(__x86_64) - ASSERT_EQ(google_breakpad::EXPLOITABILITY_INTERESTING, - ExploitabilityFor("linux_null_read_av.dmp")); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, -@@ -171,7 +176,8 @@ TEST(ExploitabilityTest, TestLinuxEngine) { - ExploitabilityFor("linux_executable_heap.dmp")); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - ExploitabilityFor("linux_jmp_to_module_not_exe_region.dmp")); --#ifndef _WIN32 -+#endif -+#if !defined(_WIN32) && (defined(__i386) || defined(__x86_64)) - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, - ExploitabilityFor("linux_write_to_nonwritable_module.dmp")); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_HIGH, -@@ -182,10 +188,10 @@ TEST(ExploitabilityTest, TestLinuxEngine) { - ExploitabilityFor("linux_write_to_outside_module_via_math.dmp")); - ASSERT_EQ(google_breakpad::EXPLOITABILITY_INTERESTING, - ExploitabilityFor("linux_write_to_under_4k.dmp")); --#endif // _WIN32 -+#endif // !defined(_WIN32) && (!defined(__i386) && !defined(__x86_64)) - } - --#ifndef _WIN32 -+#if !defined(_WIN32) && (defined(__i386) || defined(__x86_64)) - TEST(ExploitabilityLinuxUtilsTest, DisassembleBytesTest) { - ASSERT_FALSE(ExploitabilityLinuxTest::DisassembleBytes("", NULL, 5, NULL)); - uint8_t bytes[6] = {0xc7, 0x0, 0x5, 0x0, 0x0, 0x0}; -@@ -301,6 +307,7 @@ TEST(ExploitabilityLinuxUtilsTest, CalculateAddressTest) { - context, - &write_address)); - } --#endif // _WIN32 -+#endif // !defined(_WIN32) && (defined(__i386) || defined(__x86_64)) -+ - - } // namespace -diff --git a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc -index 941586e9f6..49cdc3fc28 100644 ---- a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc -+++ b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc -@@ -76,6 +76,8 @@ - #define ELF_ARCH EM_MIPS - #elif defined(__aarch64__) - #define ELF_ARCH EM_AARCH64 -+#elif defined(__powerpc64__) -+ #define ELF_ARCH EM_PPC64 - #endif - - #if defined(__arm__) -@@ -86,6 +88,8 @@ typedef user_regs user_regs_struct; - #elif defined (__mips__) - // This file-local typedef simplifies the source code. - typedef gregset_t user_regs_struct; -+#elif defined(__powerpc64__) -+typedef struct pt_regs user_regs_struct; - #endif - - using google_breakpad::MDTypeHelper; -@@ -320,6 +324,9 @@ struct CrashedProcess { - #endif - #if defined(__aarch64__) - user_fpsimd_struct fpregs; -+#endif -+#if defined(__powerpc64__) -+ mcontext_t mcontext; - #endif - uintptr_t stack_addr; - const uint8_t* stack; -@@ -534,6 +541,38 @@ ParseThreadRegisters(CrashedProcess::Thread* thread, - thread->mcontext.fpc_eir = rawregs->float_save.fir; - #endif - } -+#elif defined(__powerpc64__) -+static void -+ParseThreadRegisters(CrashedProcess::Thread* thread, -+ const MinidumpMemoryRange& range) { -+ const MDRawContextPPC64* rawregs = range.GetData(0); -+ -+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++) -+ thread->mcontext.gp_regs[i] = rawregs->gpr[i]; -+ -+ thread->mcontext.gp_regs[PT_LNK] = rawregs->lr; -+ thread->mcontext.gp_regs[PT_NIP] = rawregs->srr0; -+ thread->mcontext.gp_regs[PT_MSR] = rawregs->srr1; -+ thread->mcontext.gp_regs[PT_CCR] = rawregs->cr; -+ thread->mcontext.gp_regs[PT_XER] = rawregs->xer; -+ thread->mcontext.gp_regs[PT_CTR] = rawregs->ctr; -+ thread->mcontext.v_regs->vrsave = rawregs->vrsave; -+ -+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++) -+ thread->mcontext.fp_regs[i] = rawregs->float_save.fpregs[i]; -+ -+ thread->mcontext.fp_regs[NFPREG-1] = rawregs->float_save.fpscr; -+ -+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) { -+ thread->mcontext.v_regs->vrregs[i][0] = rawregs->vector_save.save_vr[i].high >> 32; -+ thread->mcontext.v_regs->vrregs[i][1] = rawregs->vector_save.save_vr[i].high; -+ thread->mcontext.v_regs->vrregs[i][2] = rawregs->vector_save.save_vr[i].low >> 32; -+ thread->mcontext.v_regs->vrregs[i][3] = rawregs->vector_save.save_vr[i].low; -+ } -+ -+ thread->mcontext.v_regs->vscr.vscr_word = rawregs->vector_save.save_vscr.low & 0xFFFFFFFF; -+} -+ - #else - #error "This code has not been ported to your platform yet" - #endif -@@ -622,6 +661,12 @@ ParseSystemInfo(const Options& options, CrashedProcess* crashinfo, - # else - # error "This mips ABI is currently not supported (n32)" - # endif -+#elif defined(__powerpc64__) -+ if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_PPC64) { -+ fprintf(stderr, -+ "This version of minidump-2-core only supports PPC64.\n"); -+ exit(1); -+ } - #else - #error "This code has not been ported to your platform yet" - #endif -diff --git a/third_party/crashpad/crashpad/CONTRIBUTORS b/third_party/crashpad/crashpad/CONTRIBUTORS -index 8724b7f32f..8e29424ef6 100644 ---- a/third_party/crashpad/crashpad/CONTRIBUTORS -+++ b/third_party/crashpad/crashpad/CONTRIBUTORS -@@ -13,3 +13,4 @@ Mark Mentovai - Robert Sesek - Scott Graham - Joshua Peraza -+Shawn Anastasio -diff --git a/third_party/crashpad/crashpad/compat/linux/sys/user.h b/third_party/crashpad/crashpad/compat/linux/sys/user.h -index 6ed77a98e1..1fd83469a0 100644 ---- a/third_party/crashpad/crashpad/compat/linux/sys/user.h -+++ b/third_party/crashpad/crashpad/compat/linux/sys/user.h -@@ -15,6 +15,7 @@ - #ifndef CRASHPAD_COMPAT_LINUX_SYS_USER_H_ - #define CRASHPAD_COMPAT_LINUX_SYS_USER_H_ - -+#include - #include_next - - #include -diff --git a/third_party/crashpad/crashpad/minidump/minidump_context.h b/third_party/crashpad/crashpad/minidump/minidump_context.h -index 3a3e603cb0..3118d9e9f9 100644 ---- a/third_party/crashpad/crashpad/minidump/minidump_context.h -+++ b/third_party/crashpad/crashpad/minidump/minidump_context.h -@@ -592,6 +592,70 @@ struct MinidumpContextMIPS64 { - uint64_t fir; - }; - -+//! \brief ppc64-specific flags for MinidumpPPC64::context_flags -+//! Based on minidump_cpu_ppc64.h from breakpad -+enum MinidumpContextPPC64Flags : uint32_t { -+ //! \brief Identifies the context as PPC64. -+ kMinidumpContextPPC64 = 0x01000000, -+ -+ //! \brief Indicates the validity of general purpose registers. -+ //! -+ //! Registers `r0`-`r31`, `nip`, `msr`, `lr`, etc. are valid. -+ kMinidumpContextPPC64Base = kMinidumpContextPPC64 | 0x00000001, -+ -+ //! \brief Indicates the validity of floating point registers. -+ //! -+ //! Registers `fp0`-`fp31`, `fpscr` are valid. -+ kMinidumpContextPPC64Floating = kMinidumpContextPPC64 | 0x00000008, -+ -+ //! \brief Indicates the validity of Altivec/VMX registers. -+ //! -+ //! Registers `v0`-`v31`, `vscr`, `vrsave`. -+ kMinidumpContextPPC64Vector = kMinidumpContextPPC64 | 0x00000020, -+ -+ //! \brief Indicates the validity of all registers -+ kMinidumpContextPPC64All = kMinidumpContextPPC64Base | -+ kMinidumpContextPPC64Floating | -+ kMinidumpContextPPC64Vector -+}; -+ -+//! \brief A PPC64 CPU context carried in a minidump file. -+//! Based on minidump_cpu_ppc64.h from breakpad. -+struct MinidumpContextPPC64 { -+ uint64_t context_flags; -+ -+ //! \brief General purpose registers. -+ uint64_t nip; -+ uint64_t msr; -+ uint64_t regs[32]; -+ uint64_t ccr; -+ uint64_t xer; -+ uint64_t lnk; -+ uint64_t ctr; -+ -+ //! \brief Floating point registers. -+ double fpregs[32]; -+ -+ //! \brief FPU status register. -+ double fpscr; -+ -+ //! \brief Altivec/VMX vector registers. -+ struct { -+ //! \brief Vector registers are 128bits. -+ uint128_struct save_vr[32]; -+ uint128_struct save_vscr; -+ -+ //! \brief Padding included for breakpad compatibiltiy. -+ uint32_t save_pad5[4]; -+ -+ //! \brief VRSAVE register. -+ uint32_t save_vrsave; -+ -+ //! \brief Padding included for breakpad compatibiltiy. -+ uint32_t save_pad6[7]; -+ } vregs; -+}; -+ - } // namespace crashpad - - #endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_ -diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc -index d7e53a4932..d89eb9e013 100644 ---- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc -+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc -@@ -101,6 +101,13 @@ MinidumpContextWriter::CreateFromSnapshot(const CPUContext* context_snapshot) { - break; - } - -+ case kCPUArchitecturePPC64: { -+ context = std::make_unique(); -+ reinterpret_cast(context.get()) -+ ->InitalizeFromSnapshot(context_snapshot->ppc64); -+ break; -+ } -+ - default: { - LOG(ERROR) << "unknown context architecture " - << context_snapshot->architecture; -@@ -453,4 +460,47 @@ size_t MinidumpContextMIPS64Writer::ContextSize() const { - return sizeof(context_); - } - -+MinidumpContextPPC64Writer::MinidumpContextPPC64Writer() -+ : MinidumpContextWriter(), context_() { -+ context_.context_flags = kMinidumpContextPPC64; -+} -+ -+MinidumpContextPPC64Writer::~MinidumpContextPPC64Writer() = default; -+ -+void MinidumpContextPPC64Writer::InitalizeFromSnapshot( -+ const CPUContextPPC64* context_snapshot) { -+ DCHECK_EQ(state(), kStateMutable); -+ DCHECK_EQ(context_.context_flags, kMinidumpContextPPC64); -+ -+ context_.context_flags = kMinidumpContextPPC64All; -+ -+ memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs)); -+ context_.nip = context_snapshot->nip; -+ context_.msr = context_snapshot->msr; -+ context_.ccr = context_snapshot->ccr; -+ context_.xer = context_snapshot->xer; -+ context_.lnk = context_snapshot->lnk; -+ context_.ctr = context_snapshot->ctr; -+ -+ memcpy(context_.fpregs, context_snapshot->fpregs, sizeof(context_.fpregs)); -+ context_.fpscr = context_snapshot->fpscr; -+ -+ memcpy(context_.vregs.save_vr, context_snapshot->vregs.save_vr, -+ sizeof(context_.vregs.save_vr)); -+ memcpy(&context_.vregs.save_vscr, &context_snapshot->vregs.save_vscr, -+ sizeof(context_.vregs.save_vscr)); -+ context_.vregs.save_vrsave = context_snapshot->vregs.save_vrsave; -+} -+ -+bool MinidumpContextPPC64Writer::WriteObject( -+ FileWriterInterface* file_writer) { -+ DCHECK_EQ(state(), kStateWritable); -+ return file_writer->Write(&context_, sizeof(context_)); -+} -+ -+size_t MinidumpContextPPC64Writer::ContextSize() const { -+ DCHECK_GE(state(), kStateFrozen); -+ return sizeof(context_); -+} -+ - } // namespace crashpad -diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h -index d4ab936ee7..1d22fc59c9 100644 ---- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h -+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h -@@ -315,6 +315,45 @@ class MinidumpContextMIPS64Writer final : public MinidumpContextWriter { - DISALLOW_COPY_AND_ASSIGN(MinidumpContextMIPS64Writer); - }; - -+class MinidumpContextPPC64Writer final : public MinidumpContextWriter { -+ public: -+ MinidumpContextPPC64Writer(); -+ ~MinidumpContextPPC64Writer() override; -+ -+ //! \brief Initalizes the MinidumpContextPPC64 based on \a context_snapshot. -+ //! -+ //! \param[in] context_snapshot The context snapshot to use as source data. -+ //! -+ //! \note Valid in #kStateMutable. No mutation of context() may be done before -+ //! calling this method, and it is not normally necessary to alter -+ //! context() after calling this method. -+ void InitalizeFromSnapshot(const CPUContextPPC64* context_snapshot); -+ -+ //! \brief Returns a pointer to the context structure that this object will -+ //! write. -+ //! -+ //! \attention This returns a non-`const` pointer to this object’s private -+ //! data so that a caller can populate the context structure directly. -+ //! This is done because providing setter interfaces to each field in the -+ //! context structure would be unwieldy and cumbersome. Care must be taken -+ //! to populate the context structure correctly. The context structure -+ //! must only be modified while this object is in the #kStateMutable -+ //! state. -+ MinidumpContextPPC64* context() { return &context_; } -+ -+ protected: -+ // MinidumpWritable: -+ bool WriteObject(FileWriterInterface* file_writer) override; -+ -+ // MinidumpContextWriter: -+ size_t ContextSize() const override; -+ -+ private: -+ MinidumpContextPPC64 context_; -+ -+ DISALLOW_COPY_AND_ASSIGN(MinidumpContextPPC64Writer); -+}; -+ - } // namespace crashpad - - #endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_ -diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc -index 3216a906ba..a9fcbe9d8e 100644 ---- a/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc -+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc -@@ -213,6 +213,21 @@ TEST(MinidumpContextWriter, MIPS64_FromSnapshot) { - context, ExpectMinidumpContextMIPS64, kSeed); - } - -+TEST(MinidumpContextWriter, PPC64_Zeros) { -+ EmptyContextTest( -+ ExpectMinidumpContextPPC64); -+} -+ -+TEST(MinidumpContextWriter, PPC64_FromSnapshot) { -+ constexpr uint32_t kSeed = 64; -+ CPUContextPPC64 context_ppc64; -+ CPUContext context; -+ context.ppc64 = &context_ppc64; -+ InitializeCPUContextPPC64(&context, kSeed); -+ FromSnapshotTest( -+ context, ExpectMinidumpContextPPC64, kSeed); -+} -+ - } // namespace - } // namespace test - } // namespace crashpad -diff --git a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc -index a13407605f..95dc925240 100644 ---- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc -+++ b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc -@@ -126,6 +126,8 @@ std::string MinidumpMiscInfoDebugBuildString() { - static constexpr char kCPU[] = "mips"; - #elif defined(ARCH_CPU_MIPS64EL) - static constexpr char kCPU[] = "mips64"; -+#elif defined(ARCH_CPU_PPC64) -+ static constexpr char kCPU[] = "ppc64"; - #else - #error define kCPU for this CPU - #endif -diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc -index a51626ccdc..61e0b20a17 100644 ---- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc -+++ b/third_party/crashpad/crashpad/snapshot/capture_memory.cc -@@ -111,6 +111,11 @@ void CaptureMemory::PointedToByContext(const CPUContext& context, - for (size_t i = 0; i < base::size(context.mipsel->regs); ++i) { - MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]); - } -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ MaybeCaptureMemoryAround(delegate, context.ppc64->nip); -+ for (size_t i = 0; i < base::size(context.ppc64->regs); ++i) { -+ MaybeCaptureMemoryAround(delegate, context.ppc64->regs[i]); -+ } - #else - #error Port. - #endif -diff --git a/third_party/crashpad/crashpad/snapshot/cpu_architecture.h b/third_party/crashpad/crashpad/snapshot/cpu_architecture.h -index 811a720958..f4f83981df 100644 ---- a/third_party/crashpad/crashpad/snapshot/cpu_architecture.h -+++ b/third_party/crashpad/crashpad/snapshot/cpu_architecture.h -@@ -43,7 +43,10 @@ enum CPUArchitecture { - kCPUArchitectureMIPSEL, - - //! \brief 64-bit MIPSEL. -- kCPUArchitectureMIPS64EL -+ kCPUArchitectureMIPS64EL, -+ -+ //! \brief 64-bit PPC64. -+ kCPUArchitecturePPC64 - }; - - } // namespace crashpad -diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc -index 6fb8d7e719..b01f7cad11 100644 ---- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc -+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.cc -@@ -169,6 +169,8 @@ uint64_t CPUContext::InstructionPointer() const { - return arm->pc; - case kCPUArchitectureARM64: - return arm64->pc; -+ case kCPUArchitecturePPC64: -+ return ppc64->nip; - default: - NOTREACHED(); - return ~0ull; -@@ -185,6 +187,8 @@ uint64_t CPUContext::StackPointer() const { - return arm->sp; - case kCPUArchitectureARM64: - return arm64->sp; -+ case kCPUArchitecturePPC64: -+ return ppc64->regs[1]; - default: - NOTREACHED(); - return ~0ull; -@@ -196,6 +200,7 @@ bool CPUContext::Is64Bit() const { - case kCPUArchitectureX86_64: - case kCPUArchitectureARM64: - case kCPUArchitectureMIPS64EL: -+ case kCPUArchitecturePPC64: - return true; - case kCPUArchitectureX86: - case kCPUArchitectureARM: -diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.h b/third_party/crashpad/crashpad/snapshot/cpu_context.h -index fb23c4679f..eebede63c6 100644 ---- a/third_party/crashpad/crashpad/snapshot/cpu_context.h -+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.h -@@ -352,6 +352,24 @@ struct CPUContextMIPS64 { - uint64_t fir; - }; - -+//! \brief A context structure carrying PPC64 CPU state. -+struct CPUContextPPC64 { -+ uint64_t nip; -+ uint64_t msr; -+ uint64_t regs[32]; -+ uint64_t ccr; -+ uint64_t xer; -+ uint64_t lnk; -+ uint64_t ctr; -+ double fpregs[32]; -+ double fpscr; -+ struct { -+ uint128_struct save_vr[32]; -+ uint128_struct save_vscr; -+ uint32_t save_vrsave; -+ } vregs; -+}; -+ - //! \brief A context structure capable of carrying the context of any supported - //! CPU architecture. - struct CPUContext { -@@ -382,6 +400,7 @@ struct CPUContext { - CPUContextARM64* arm64; - CPUContextMIPS* mipsel; - CPUContextMIPS64* mips64; -+ CPUContextPPC64* ppc64; - }; - }; - -diff --git a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h -index 37fbc4325c..cf4ef7ef96 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h -+++ b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h -@@ -15,6 +15,7 @@ - #ifndef CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_ - #define CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_ - -+#include - #include "build/build_config.h" - #include "snapshot/cpu_context.h" - #include "snapshot/linux/signal_context.h" -@@ -174,6 +175,78 @@ void InitializeCPUContextMIPS( - - #endif // ARCH_CPU_MIPS_FAMILY || DOXYGEN - -+#if defined(ARCH_CPU_PPC64_FAMILY) || DOXYGEN -+ -+//! \brief Initalizes a CPUContextPPC64 structure from native context -+//! structures on Linux. -+//! -+//! \param[in] thread_context The native thread context. -+//! \param[in] float_context The native float context. -+//! \param[in] vector_context The native vector context. -+//! \param[out] context The CPUContextPPC64 structure to initalize. -+template -+void InitializeCPUContextPPC64( -+ const ThreadContext::t64_t& thread_context, -+ const FloatContext::f64_t& float_context, -+ const VectorContext::v64_t& vector_context, -+ typename Traits::CPUContext* context) { -+ -+ memcpy(context->regs, thread_context.gpr, sizeof(context->regs)); -+ context->nip = thread_context.nip; -+ context->msr = thread_context.msr; -+ context->ccr = thread_context.ccr; -+ context->xer = thread_context.xer; -+ context->lnk = thread_context.lnk; -+ context->ctr = thread_context.ctr; -+ -+ memcpy(context->fpregs, float_context.fpregs, sizeof(context->fpregs)); -+ context->fpscr = float_context.fpscr; -+ -+ for (uint8_t i = 0; i < 32; i++) { -+ context->vregs.save_vr[i] = { -+ (((uint64_t)vector_context.vrregs[i][0]) << 32) | -+ vector_context.vrregs[i][1], -+ (((uint64_t)vector_context.vrregs[i][2]) << 32) | -+ vector_context.vrregs[i][3] -+ }; -+ } -+ context->vregs.save_vrsave = vector_context.vrsave; -+ context->vregs.save_vscr = {0, (uint64_t)vector_context.vscr.vscr_word}; -+} -+ -+template -+void InitializeCPUContextPPC64( -+ const SignalThreadContext64 &thread_context, -+ const SignalFloatContext64 &float_context, -+ const SignalVectorContext64 &vector_context, -+ typename Traits::CPUContext* context) { -+ -+ memcpy(context->regs, thread_context.regs, sizeof(context->regs)); -+ context->nip = thread_context.nip; -+ context->msr = thread_context.msr; -+ context->ccr = thread_context.ccr; -+ context->xer = thread_context.xer; -+ context->lnk = thread_context.lnk; -+ context->ctr = thread_context.ctr; -+ -+ memcpy(context->fpregs, float_context.regs, sizeof(context->fpregs)); -+ context->fpscr = float_context.fpscr; -+ -+ for (uint8_t i = 0; i < 32; i++) { -+ context->vregs.save_vr[i] = { -+ (((uint64_t)vector_context.vrregs[i][0]) << 32) | -+ vector_context.vrregs[i][1], -+ (((uint64_t)vector_context.vrregs[i][2]) << 32) | -+ vector_context.vrregs[i][3] -+ }; -+ } -+ context->vregs.save_vrsave = vector_context.vrsave; -+ context->vregs.save_vscr = {0, (uint64_t)vector_context.vscr.vscr_word}; -+} -+ -+ -+#endif -+ - } // namespace internal - } // namespace crashpad - -diff --git a/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc b/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc -index be22c90313..c5df23d1b4 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc -@@ -159,9 +159,11 @@ void TestAgainstTarget(PtraceConnection* connection) { - const bool is_vdso_mapping = - device == 0 && inode == 0 && mapping_name == "[vdso]"; - static constexpr char kPrefix[] = "linux-vdso.so."; -+ static constexpr char kPrefix64[] = "linux-vdso64.so."; - return is_vdso_mapping == - (module_name.empty() || -- module_name.compare(0, strlen(kPrefix), kPrefix) == 0); -+ module_name.compare(0, strlen(kPrefix), kPrefix) == 0 || -+ module_name.compare(0, strlen(kPrefix64), kPrefix64) == 0); - }, - module_mapping->name, - module_mapping->device, -diff --git a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc -index cd40b3b12d..6bcf23b6ff 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc -@@ -323,6 +323,69 @@ bool ExceptionSnapshotLinux::ReadContext( - reader, context_address, context_.mips64); - } - -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ -+template -+static bool ReadContext(ProcessReaderLinux* reader, -+ LinuxVMAddress context_address, -+ typename Traits::CPUContext* dest_context) { -+ const ProcessMemory* memory = reader->Memory(); -+ -+ LinuxVMAddress gp_regs_address = context_address + -+ offsetof(UContext, mcontext) + -+ offsetof(typename Traits::MContext, gp_regs); -+ -+ typename Traits::SignalThreadContext thread_context; -+ if (!memory->Read(gp_regs_address, sizeof(thread_context), &thread_context)) { -+ LOG(ERROR) << "Couldn't read gp_regs!"; -+ return false; -+ } -+ -+ LinuxVMAddress fp_regs_address = context_address + -+ offsetof(UContext, mcontext) + -+ offsetof(typename Traits::MContext, fp_regs); -+ -+ typename Traits::SignalFloatContext fp_context; -+ if (!memory->Read(fp_regs_address, sizeof(fp_context), &fp_context)) { -+ LOG(ERROR) << "Couldn't read fp_regs!"; -+ return false; -+ } -+ -+ LinuxVMAddress v_regs_ptr_address = context_address + -+ offsetof(UContext, mcontext) + -+ offsetof(typename Traits::MContext, vmx_reserve) + 8; -+ -+ typename Traits::SignalVectorContext v_context; -+ if (!memory->Read(v_regs_ptr_address, sizeof(v_context), &v_context)) { -+ LOG(ERROR) << "Couldn't read v_regs!"; -+ return false; -+ } -+ -+ InitializeCPUContextPPC64(thread_context, fp_context, -+ v_context, dest_context); -+ -+ return true; -+} -+ -+template<> -+bool ExceptionSnapshotLinux::ReadContext( -+ ProcessReaderLinux* reader, -+ LinuxVMAddress context_address) { -+ context_.architecture = kCPUArchitecturePPC64; -+ context_.ppc64 = &context_union_.ppc64; -+ -+ return internal::ReadContext( -+ reader, context_address, context_.ppc64); -+} -+ -+template<> -+bool ExceptionSnapshotLinux::ReadContext( -+ ProcessReaderLinux* reader, -+ LinuxVMAddress context_address) { -+ // PPC64 is 64-bit -+ return false; -+} -+ - #endif // ARCH_CPU_X86_FAMILY - - bool ExceptionSnapshotLinux::Initialize(ProcessReaderLinux* process_reader, -diff --git a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h -index ea0cd21066..e42df520ff 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h -+++ b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h -@@ -84,6 +84,8 @@ class ExceptionSnapshotLinux final : public ExceptionSnapshot { - #elif defined(ARCH_CPU_MIPS_FAMILY) - CPUContextMIPS mipsel; - CPUContextMIPS64 mips64; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ CPUContextPPC64 ppc64; - #endif - } context_union_; - CPUContext context_; -diff --git a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc -index e4ff1ab79f..25534dd087 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc -@@ -296,7 +296,28 @@ void ExpectContext(const CPUContext& actual, const NativeCPUContext& expected) { - 0); - #undef CPU_ARCH_NAME - } -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+using NativeCPUContext = ucontext_t; -+ -+void InitializeContext(NativeCPUContext* context) { -+ for (size_t reg = 0; reg < 32; ++reg) { -+ context->uc_mcontext.gp_regs[reg] = reg; -+ } -+ -+ memset(&context->uc_mcontext.fp_regs, 44, -+ sizeof(context->uc_mcontext.fp_regs)); -+} - -+void ExpectContext(const CPUContext& actual, const NativeCPUContext& expected) { -+ EXPECT_EQ(actual.architecture, kCPUArchitecturePPC64); -+ -+ for (size_t reg = 0; reg < 32; ++reg) { -+ EXPECT_EQ(actual.ppc64->regs[reg], expected.uc_mcontext.gp_regs[reg]); -+ } -+ -+ EXPECT_EQ(memcmp(actual.ppc64->fpregs, expected.uc_mcontext.fp_regs, -+ sizeof(actual.ppc64->fpregs)), 0); -+} - #else - #error Port. - #endif -diff --git a/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc -index b96abfe74f..df12ca5669 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc -@@ -108,6 +108,8 @@ void ProcessReaderLinux::Thread::InitializeStack(ProcessReaderLinux* reader) { - #elif defined(ARCH_CPU_MIPS_FAMILY) - stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29] - : thread_info.thread_context.t32.regs[29]; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ stack_pointer = thread_info.thread_context.t64.gpr[1]; - #else - #error Port. - #endif -diff --git a/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux_test.cc b/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux_test.cc -index d767700205..40ad41d74f 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux_test.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux_test.cc -@@ -613,6 +613,8 @@ bool WriteTestModule(const base::FilePath& module_path) { - module.ehdr.e_machine = EM_AARCH64; - #elif defined(ARCH_CPU_MIPSEL) || defined(ARCH_CPU_MIPS64EL) - module.ehdr.e_machine = EM_MIPS; -+#elif defined(ARCH_CPU_PPC64) -+ module.ehdr.e_machine = EM_PPC64; - #endif - - module.ehdr.e_version = EV_CURRENT; -diff --git a/third_party/crashpad/crashpad/snapshot/linux/signal_context.h b/third_party/crashpad/crashpad/snapshot/linux/signal_context.h -index 110024680b..a1f2da2591 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/signal_context.h -+++ b/third_party/crashpad/crashpad/snapshot/linux/signal_context.h -@@ -422,6 +422,89 @@ static_assert(offsetof(UContext, mcontext.fpregs) == - "context offset mismatch"); - #endif - -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ -+struct SignalThreadContext64 { -+ uint64_t regs[32]; -+ uint64_t nip; -+ uint64_t msr; -+ uint64_t orig_r3; -+ uint64_t ctr; -+ uint64_t lnk; -+ uint64_t xer; -+ uint64_t ccr; -+ uint64_t softe; -+ uint64_t trap; -+ uint64_t dar; -+ uint64_t dsisr; -+ uint64_t result; -+ uint64_t dscr; -+ uint64_t fpr0[3]; -+}; -+ -+struct SignalFloatContext64 { -+ double regs[32]; -+ double fpscr; -+}; -+ -+struct SignalVectorContext64 { -+ int32_t vrregs[32][4]; -+ struct { -+ int32_t __pad[3]; -+ int32_t vscr_word; -+ } vscr; -+ int32_t vrsave; -+ int32_t __pad[3]; -+} __attribute__((__aligned__(16))); -+ -+ -+#pragma pack(pop) -+struct MContext64 { -+ uint64_t reserved[4]; -+ int32_t signal; -+ int32_t __pad0; -+ uint64_t handler; -+ uint64_t oldmask; -+ uint64_t pt_regs_ptr; -+ SignalThreadContext64 gp_regs; -+ SignalFloatContext64 fp_regs; -+ SignalVectorContext64 *v_regs; -+ int64_t vmx_reserve[69]; -+}; -+ -+struct ContextTraits64 : public Traits64 { -+ using MContext = MContext64; -+ using SignalThreadContext = SignalThreadContext64; -+ using SignalFloatContext = SignalFloatContext64; -+ using SignalVectorContext = SignalVectorContext64; -+ using CPUContext = CPUContextPPC64; -+}; -+ -+struct ContextTraits32 : public Traits32 {}; -+ -+struct UContext { -+ uint64_t flags; -+ uint64_t link; -+ SignalStack stack; -+ Sigset sigmask; -+ MContext64 mcontext; -+}; -+#pragma pack(push, 1) -+ -+static_assert(sizeof(UContext) == sizeof(ucontext_t), -+ "ucontext_t size mismatch"); -+static_assert(sizeof(MContext64) == sizeof(mcontext_t), -+ "mcontext_t size mismatch"); -+static_assert(sizeof(SignalThreadContext64) == sizeof(gregset_t), -+ "gregset_t size mismatch"); -+static_assert(sizeof(SignalFloatContext64) == sizeof(fpregset_t), -+ "fpregset_t size mismatch"); -+static_assert(sizeof(SignalVectorContext64) == sizeof(vrregset_t), -+ "vrregset_t size mismatch"); -+static_assert(offsetof(UContext, mcontext) == -+ offsetof(ucontext_t, uc_mcontext), "mcontext offset mismatch"); -+static_assert(offsetof(MContext64, gp_regs) == -+ offsetof(mcontext_t, gp_regs), "gp_regs offset mismatch"); - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -diff --git a/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc -index 8564d3d455..b690ecd48f 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc -@@ -203,6 +203,8 @@ CPUArchitecture SystemSnapshotLinux::GetCPUArchitecture() const { - #elif defined(ARCH_CPU_MIPS_FAMILY) - return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL - : kCPUArchitectureMIPSEL; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ return kCPUArchitecturePPC64; - #else - #error port to your architecture - #endif -@@ -218,6 +220,9 @@ uint32_t SystemSnapshotLinux::CPURevision() const { - #elif defined(ARCH_CPU_MIPS_FAMILY) - // Not implementable on MIPS - return 0; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // Not yet implemented on PPC64 -+ return 0; - #else - #error port to your architecture - #endif -@@ -238,6 +243,9 @@ std::string SystemSnapshotLinux::CPUVendor() const { - #elif defined(ARCH_CPU_MIPS_FAMILY) - // Not implementable on MIPS - return std::string(); -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // Not yet implemented on PPC64 -+ return std::string(); - #else - #error port to your architecture - #endif -@@ -371,6 +379,9 @@ bool SystemSnapshotLinux::NXEnabled() const { - #elif defined(ARCH_CPU_MIPS_FAMILY) - // Not implementable on MIPS - return false; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // Not yet implemented on PPC64 -+ return false; - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -diff --git a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc -index e3e2bebddb..8ef43752eb 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc -+++ b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc -@@ -186,6 +186,14 @@ bool ThreadSnapshotLinux::Initialize(ProcessReaderLinux* process_reader, - thread.thread_info.float_context.f32, - context_.mipsel); - } -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ context_.architecture = kCPUArchitecturePPC64; -+ context_.ppc64 = &context_union_.ppc64; -+ InitializeCPUContextPPC64( -+ thread.thread_info.thread_context.t64, -+ thread.thread_info.float_context.f64, -+ thread.thread_info.vector_context.v64, -+ context_.ppc64); - #else - #error Port. - #endif -diff --git a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h -index 44cc6f6d97..d4136461e2 100644 ---- a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h -+++ b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h -@@ -68,6 +68,8 @@ class ThreadSnapshotLinux final : public ThreadSnapshot { - #elif defined(ARCH_CPU_MIPS_FAMILY) - CPUContextMIPS mipsel; - CPUContextMIPS64 mips64; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ CPUContextPPC64 ppc64; - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -diff --git a/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc b/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc -index d3d5ebdfb9..3fd730cb52 100644 ---- a/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc -+++ b/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc -@@ -56,6 +56,11 @@ bool AuxiliaryVector::Read(PtraceConnection* connection) { - if (type == AT_IGNORE) { - continue; - } -+#if defined(ARCH_CPU_PPC64_FAMILY) -+ if (type == AT_IGNOREPPC) { -+ continue; -+ } -+#endif - if (!MapInsertOrReplace(&values_, type, value, nullptr)) { - LOG(ERROR) << "duplicate auxv entry"; - return false; -diff --git a/third_party/crashpad/crashpad/util/linux/ptrace_broker.cc b/third_party/crashpad/crashpad/util/linux/ptrace_broker.cc -index 155a1e0c6f..5e50ceb5f8 100644 ---- a/third_party/crashpad/crashpad/util/linux/ptrace_broker.cc -+++ b/third_party/crashpad/crashpad/util/linux/ptrace_broker.cc -@@ -94,8 +94,8 @@ int PtraceBroker::Run() { - } - - bool PtraceBroker::AllocateAttachments() { -- constexpr size_t page_size = 4096; -- constexpr size_t alloc_size = -+ static size_t page_size = getpagesize(); -+ size_t alloc_size = - (sizeof(ScopedPtraceAttach) + page_size - 1) & ~(page_size - 1); - void* alloc = sbrk(alloc_size); - if (reinterpret_cast(alloc) == -1) { -diff --git a/third_party/crashpad/crashpad/util/linux/ptracer.cc b/third_party/crashpad/crashpad/util/linux/ptracer.cc -index c6c9229946..c770b6b6fe 100644 ---- a/third_party/crashpad/crashpad/util/linux/ptracer.cc -+++ b/third_party/crashpad/crashpad/util/linux/ptracer.cc -@@ -394,6 +394,64 @@ bool GetThreadArea64(pid_t tid, - return true; - } - -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+// PPC64 has had HAVE_ARCH_TRACEHOOK set since 2.6.27 (even before x86 had it). -+// That means we can simply use PTRACE_GETREGESET. -+ -+template -+bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) { -+ iovec iov; -+ iov.iov_base = reinterpret_cast(dest); -+ iov.iov_len = sizeof(*dest); -+ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast(set), &iov) != 0) { -+ PLOG_IF(ERROR, can_log) << "ptrace"; -+ return false; -+ } -+ if (iov.iov_len != sizeof(*dest)) { -+ LOG_IF(ERROR, can_log) << "Unexpected registers size"; -+ return false; -+ } -+ return true; -+} -+ -+bool GetVectorRegisters64(pid_t tid, -+ VectorContext* context, -+ bool can_log) { -+ return GetRegisterSet(tid, NT_PPC_VMX, &context->v64, can_log); -+} -+ -+bool GetFloatingPointRegisters64(pid_t tid, -+ FloatContext* context, -+ bool can_log) { -+ return GetRegisterSet(tid, NT_PRFPREG, &context->f64, can_log); -+} -+ -+bool GetThreadArea64(pid_t tid, -+ const ThreadContext& context, -+ LinuxVMAddress* address, -+ bool can_log) { -+ // PPC64 doesn't have PTRACE_GET_THREAD_AREA since the thread pointer -+ // is stored in GPR 13. -+ ThreadContext::t64_t tc; -+ if (!GetRegisterSet(tid, NT_PRSTATUS, &tc, can_log)) { -+ LOG_IF(ERROR, can_log) << "Unable to get thread pointer!"; -+ return false; -+ } -+ -+ *address = tc.gpr[13]; -+ -+ return true; -+} -+ -+// Stubs for 32-bit functions not applicable on PPC64 -+bool GetFloatingPointRegisters32(pid_t tid, -+ FloatContext* context, -+ bool can_log) { return false; } -+bool GetThreadArea32(pid_t tid, -+ const ThreadContext &context, -+ LinuxVMAddress *address, -+ bool can_log) { return false; } -+ - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -@@ -486,6 +544,9 @@ bool Ptracer::GetThreadInfo(pid_t tid, ThreadInfo* info) { - if (is_64_bit_) { - return GetGeneralPurposeRegisters64(tid, &info->thread_context, can_log_) && - GetFloatingPointRegisters64(tid, &info->float_context, can_log_) && -+#if defined(ARCH_CPU_PPC64_FAMILY) -+ GetVectorRegisters64(tid, &info->vector_context, can_log_) && -+#endif - GetThreadArea64(tid, - info->thread_context, - &info->thread_specific_data_address, -diff --git a/third_party/crashpad/crashpad/util/linux/thread_info.h b/third_party/crashpad/crashpad/util/linux/thread_info.h -index 5b55c24a76..dea0d1f39e 100644 ---- a/third_party/crashpad/crashpad/util/linux/thread_info.h -+++ b/third_party/crashpad/crashpad/util/linux/thread_info.h -@@ -28,6 +28,10 @@ - #include - #endif - -+#if defined(ARCH_CPU_PPC64_FAMILY) -+#include -+#endif -+ - namespace crashpad { - - //! \brief The set of general purpose registers for an architecture family. -@@ -79,6 +83,8 @@ union ThreadContext { - uint32_t cp0_status; - uint32_t cp0_cause; - uint32_t padding1_; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // PPC64 is 64-bit - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -@@ -132,6 +138,21 @@ union ThreadContext { - uint64_t cp0_badvaddr; - uint64_t cp0_status; - uint64_t cp0_cause; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // Reflects struct pt_regs in asm/ptrace.h. -+ uint64_t gpr[32]; -+ uint64_t nip; -+ uint64_t msr; -+ uint64_t orig_gpr3; -+ uint64_t ctr; -+ uint64_t lnk; -+ uint64_t xer; -+ uint64_t ccr; -+ uint64_t softe; -+ uint64_t trap; -+ uint64_t dar; -+ uint64_t dsisr; -+ uint64_t result; - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -@@ -143,6 +164,8 @@ union ThreadContext { - using NativeThreadContext = user_regs; - #elif defined(ARCH_CPU_MIPS_FAMILY) - // No appropriate NativeThreadsContext type available for MIPS -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ using NativeThreadContext = struct pt_regs; - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64 -@@ -218,6 +241,9 @@ union FloatContext { - } fpregs[32]; - uint32_t fpcsr; - uint32_t fpu_id; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // Crashpad's PPC support is 64-bit only, so this -+ // 32bit-only struct is declared as empty. - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -@@ -252,6 +278,10 @@ union FloatContext { - double fpregs[32]; - uint32_t fpcsr; - uint32_t fpu_id; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ // Reflects fpregset_t in sys/ucontext.h -+ double fpregs[32]; -+ double fpscr; - #else - #error Port. - #endif // ARCH_CPU_X86_FAMILY -@@ -280,6 +310,8 @@ union FloatContext { - static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch"); - #elif defined(ARCH_CPU_MIPS_FAMILY) - // No appropriate floating point context native type for available MIPS. -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ static_assert(sizeof(f64) == sizeof(fpregset_t), "Size mismatch"); - #else - #error Port. - #endif // ARCH_CPU_X86 -@@ -287,6 +319,26 @@ union FloatContext { - static_assert(std::is_standard_layout::value, - "Not standard layout"); - -+//! \brief The vector registers used for an architecture family -+union VectorContext { -+ struct v32_t {} v32; -+#if defined(ARCH_CPU_PPC64_FAMILY) -+ __attribute__((__aligned__(16))) // Vector context must be doubleword aligned. -+#endif -+ struct v64_t { -+#if defined(ARCH_CPU_PPC64_FAMILY) -+ // Reflects vrregset_t in sys/ucontext.h -+ uint32_t vrregs[32][4]; -+ struct { -+ uint32_t __pad[3]; -+ uint32_t vscr_word; -+ } vscr; -+ uint32_t vrsave; -+ uint32_t __pad[3]; -+#endif -+ } v64; -+}; -+ - //! \brief A collection of `ptrace`-able information about a thread. - struct ThreadInfo { - ThreadInfo(); -@@ -298,6 +350,9 @@ struct ThreadInfo { - //! \brief The floating point registers for the thread. - FloatContext float_context; - -+ //! \brief (Optional) The vector registers used for the thread. -+ VectorContext vector_context; -+ - //! \brief The thread-local storage address for the thread. - LinuxVMAddress thread_specific_data_address; - }; -diff --git a/third_party/crashpad/crashpad/util/misc/capture_context.h b/third_party/crashpad/crashpad/util/misc/capture_context.h -index 541589dfde..5b0fc8218c 100644 ---- a/third_party/crashpad/crashpad/util/misc/capture_context.h -+++ b/third_party/crashpad/crashpad/util/misc/capture_context.h -@@ -66,6 +66,7 @@ using NativeCPUContext = ucontext_t; - //! macOS/Linux/Fuchsia | x86_64 | `%%rdi` - //! Linux | ARM/ARM64 | `r0`/`x0` - //! Linux | MIPS/MIPS64 | `$a0` -+//! Linux | PPC64 | `r3` - //! - //! Additionally, the value `LR` on ARM/ARM64 will be the return address of - //! this function. -diff --git a/third_party/crashpad/crashpad/util/misc/capture_context_linux.S b/third_party/crashpad/crashpad/util/misc/capture_context_linux.S -index de71e72312..af0ffff392 100644 ---- a/third_party/crashpad/crashpad/util/misc/capture_context_linux.S -+++ b/third_party/crashpad/crashpad/util/misc/capture_context_linux.S -@@ -28,7 +28,7 @@ - .globl CAPTURECONTEXT_SYMBOL2 - #if defined(__i386__) || defined(__x86_64__) - .balign 16, 0x90 --#elif defined(__arm__) || defined(__aarch64__) || defined(__mips__) -+#elif defined(__arm__) || defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) - .balign 4, 0x0 - #endif - -@@ -419,4 +419,214 @@ CAPTURECONTEXT_SYMBOL2: - jr $ra - - .set at -+#elif defined(__powerpc64__) -+ // Store r0-r31 -+ std 0, 0xe8(3) // context->uc_mcontext.gp_regs[0] -+ std 1, 0xf0(3) // context->uc_mcontext.gp_regs[1] -+ std 2, 0xf8(3) // context->uc_mcontext.gp_regs[2] -+ // note that r3's original value was lost -+ std 3, 0x100(3) // context->uc_mcontext.gp_regs[3] -+ std 4, 0x108(3) // context->uc_mcontext.gp_regs[4] -+ std 5, 0x110(3) // context->uc_mcontext.gp_regs[5] -+ std 6, 0x118(3) // context->uc_mcontext.gp_regs[6] -+ std 7, 0x120(3) // context->uc_mcontext.gp_regs[7] -+ std 8, 0x128(3) // context->uc_mcontext.gp_regs[8] -+ std 9, 0x130(3) // context->uc_mcontext.gp_regs[9] -+ std 10, 0x138(3) // context->uc_mcontext.gp_regs[10] -+ std 11, 0x140(3) // context->uc_mcontext.gp_regs[11] -+ std 12, 0x148(3) // context->uc_mcontext.gp_regs[12] -+ std 13, 0x150(3) // context->uc_mcontext.gp_regs[13] -+ std 14, 0x158(3) // context->uc_mcontext.gp_regs[14] -+ std 15, 0x160(3) // context->uc_mcontext.gp_regs[15] -+ std 16, 0x168(3) // context->uc_mcontext.gp_regs[16] -+ std 17, 0x170(3) // context->uc_mcontext.gp_regs[17] -+ std 18, 0x178(3) // context->uc_mcontext.gp_regs[18] -+ std 19, 0x180(3) // context->uc_mcontext.gp_regs[19] -+ std 20, 0x188(3) // context->uc_mcontext.gp_regs[20] -+ std 21, 0x190(3) // context->uc_mcontext.gp_regs[21] -+ std 22, 0x198(3) // context->uc_mcontext.gp_regs[22] -+ std 23, 0x1a0(3) // context->uc_mcontext.gp_regs[23] -+ std 24, 0x1a8(3) // context->uc_mcontext.gp_regs[24] -+ std 25, 0x1b0(3) // context->uc_mcontext.gp_regs[25] -+ std 26, 0x1b8(3) // context->uc_mcontext.gp_regs[26] -+ std 27, 0x1c0(3) // context->uc_mcontext.gp_regs[27] -+ std 28, 0x1c8(3) // context->uc_mcontext.gp_regs[28] -+ std 29, 0x1d0(3) // context->uc_mcontext.gp_regs[29] -+ std 30, 0x1d8(3) // context->uc_mcontext.gp_regs[30] -+ std 31, 0x1e0(3) // context->uc_mcontext.gp_regs[31] -+ -+ // For NIP, we can use the value in the link register -+ mflr 0 -+ std 0, 0x1e8(3) // context->uc_mcontext.gp_regs[PT_NIP] -+ -+ // CTR -+ mfctr 0 -+ std 0, 0x200(3) // context->uc_mcontext.gp_regs[PT_CTR] -+ -+ // For LNK, we'll use the caller's LR save area (2 stack frames up). -+ // r4 can be used as a scratch register since it has already been saved. -+ ld 4, 0(1) -+ ld 4, 16(4) -+ std 4, 0x208(3) // context->uc_mcontext.gp_regs[PT_LNK] -+ -+ // XER -+ mfxer 0 -+ std 0, 0x210(3) // context->uc_mcontext.gp_regs[PT_XER] -+ -+ // CCR -+ mfcr 0 -+ std 0, 0x218(3) // context->uc_mcontext.gp_regs[PT_CCR] -+ -+ // MSR, orig_r3, MQ, TRAP, DAR, DSISR, RESULT, DSCR, -+ // not used or not relevant, zero them out. -+ li 4, 0 -+ std 4, 0x1f0(3) // context->uc_mcontext.gp_regs[PT_MSR] -+ std 4, 0x1f8(3) // context->uc_mcontext.gp_regs[PT_ORIG_R3] -+ std 4, 0x220(3) // context->uc_mcontext.gp_regs[PT_MQ] -+ std 4, 0x228(3) // context->uc_mcontext.gp_regs[PT_TRAP] -+ std 4, 0x230(3) // context->uc_mcontext.gp_regs[PT_DAR] -+ std 4, 0x238(3) // context->uc_mcontext.gp_regs[PT_DSISR] -+ std 4, 0x240(3) // context->uc_mcontext.gp_regs[PT_RESULT] -+ std 4, 0x248(3) // context->uc_mcontext.gp_regs[PT_DSCR] -+ -+ // Update context->uc_mcontext.regs to point to gp_regs -+ addi 0, 3, 0xe8 -+ std 0, 0xe0(3) -+ -+ // Save floating point registers 0-31 -+ stfd 0, 0x268(3) // context->uc_mcontext.fp_regs[0] -+ stfd 1, 0x270(3) // context->uc_mcontext.fp_regs[1] -+ stfd 2, 0x278(3) // context->uc_mcontext.fp_regs[2] -+ stfd 3, 0x280(3) // context->uc_mcontext.fp_regs[3] -+ stfd 4, 0x288(3) // context->uc_mcontext.fp_regs[4] -+ stfd 5, 0x290(3) // context->uc_mcontext.fp_regs[5] -+ stfd 6, 0x298(3) // context->uc_mcontext.fp_regs[6] -+ stfd 7, 0x2a0(3) // context->uc_mcontext.fp_regs[7] -+ stfd 8, 0x2a8(3) // context->uc_mcontext.fp_regs[8] -+ stfd 9, 0x2b0(3) // context->uc_mcontext.fp_regs[9] -+ stfd 10, 0x2b8(3) // context->uc_mcontext.fp_regs[10] -+ stfd 11, 0x2c0(3) // context->uc_mcontext.fp_regs[11] -+ stfd 12, 0x2c8(3) // context->uc_mcontext.fp_regs[12] -+ stfd 13, 0x2d0(3) // context->uc_mcontext.fp_regs[13] -+ stfd 14, 0x2d8(3) // context->uc_mcontext.fp_regs[14] -+ stfd 15, 0x2e0(3) // context->uc_mcontext.fp_regs[15] -+ stfd 16, 0x2e8(3) // context->uc_mcontext.fp_regs[16] -+ stfd 17, 0x2f0(3) // context->uc_mcontext.fp_regs[17] -+ stfd 18, 0x2f8(3) // context->uc_mcontext.fp_regs[18] -+ stfd 19, 0x300(3) // context->uc_mcontext.fp_regs[19] -+ stfd 20, 0x308(3) // context->uc_mcontext.fp_regs[20] -+ stfd 21, 0x310(3) // context->uc_mcontext.fp_regs[21] -+ stfd 22, 0x318(3) // context->uc_mcontext.fp_regs[22] -+ stfd 23, 0x320(3) // context->uc_mcontext.fp_regs[23] -+ stfd 24, 0x328(3) // context->uc_mcontext.fp_regs[24] -+ stfd 25, 0x330(3) // context->uc_mcontext.fp_regs[25] -+ stfd 26, 0x338(3) // context->uc_mcontext.fp_regs[26] -+ stfd 27, 0x340(3) // context->uc_mcontext.fp_regs[27] -+ stfd 28, 0x348(3) // context->uc_mcontext.fp_regs[28] -+ stfd 29, 0x350(3) // context->uc_mcontext.fp_regs[29] -+ stfd 30, 0x358(3) // context->uc_mcontext.fp_regs[30] -+ stfd 31, 0x360(3) // context->uc_mcontext.fp_regs[31] -+ -+ // FPSCR -+ mffs 0 -+ stfd 0, 0x368(3) // context->uc_mcontext.fp_regs[32] -+ -+ // Save VMX Vector registers -+ // Update r4 to contain the base address of vmx_reserve -+ addi 4, 3, 0x378 -+ // Ensure that it is quadword aligned -+ andi. 5, 4, 0xF -+ beq 1f // No alignment is necessary -+ // Address is doubleword aligned and not quadword aligned, add 8 -+ addi 4, 4, 8 -+ -+1: -+ // Store VMX registers 0-31 -+ // r4 will contain the base address -+ // r5 will contain the index -+ li 5, 0 -+ stvx 0, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 0] -+ addi 5, 5, 16 -+ stvx 1, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 1] -+ addi 5, 5, 16 -+ stvx 2, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 2] -+ addi 5, 5, 16 -+ stvx 3, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 3] -+ addi 5, 5, 16 -+ stvx 4, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 4] -+ addi 5, 5, 16 -+ stvx 5, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 5] -+ addi 5, 5, 16 -+ stvx 6, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 6] -+ addi 5, 5, 16 -+ stvx 7, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 7] -+ addi 5, 5, 16 -+ stvx 8, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 8] -+ addi 5, 5, 16 -+ stvx 9, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 9] -+ addi 5, 5, 16 -+ stvx 10, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 10] -+ addi 5, 5, 16 -+ stvx 11, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 11] -+ addi 5, 5, 16 -+ stvx 12, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 12] -+ addi 5, 5, 16 -+ stvx 13, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 13] -+ addi 5, 5, 16 -+ stvx 14, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 14] -+ addi 5, 5, 16 -+ stvx 15, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 15] -+ addi 5, 5, 16 -+ stvx 16, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 16] -+ addi 5, 5, 16 -+ stvx 17, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 17] -+ addi 5, 5, 16 -+ stvx 18, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 18] -+ addi 5, 5, 16 -+ stvx 19, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 19] -+ addi 5, 5, 16 -+ stvx 20, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 20] -+ addi 5, 5, 16 -+ stvx 21, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 21] -+ addi 5, 5, 16 -+ stvx 22, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 22] -+ addi 5, 5, 16 -+ stvx 23, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 23] -+ addi 5, 5, 16 -+ stvx 24, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 24] -+ addi 5, 5, 16 -+ stvx 25, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 25] -+ addi 5, 5, 16 -+ stvx 26, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 26] -+ addi 5, 5, 16 -+ stvx 27, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 27] -+ addi 5, 5, 16 -+ stvx 28, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 28] -+ addi 5, 5, 16 -+ stvx 29, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 29] -+ addi 5, 5, 16 -+ stvx 30, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 30] -+ addi 5, 5, 16 -+ stvx 31, 4, 5 // context->uc_mcontext.vmx_reserve[(align) + 31] -+ addi 5, 5, 16 -+ -+ // VSCR -+ mfvscr 0 -+ stvx 0, 4, 5 -+ addi 5, 5, 16 -+ -+ // VRSAVE -+ mfvrsave 0 -+ stwx 0, 4, 5 -+ -+ // Update context->uc_mcontext.v_regs to point to vmx_reserve + alignment. -+ std 4, 0x370(3) -+ -+ // Zero out all unused fields -+ li 4, 0 -+ std 4, 0xc8(3) // context->uc_mcontext.signal -+ std 4, 0xd0(3) // context->uc_mcontext.handler -+ std 4, 0xd8(3) // context->uc_mcontext.oldmask -+ -+ blr - #endif // __i386__ -diff --git a/third_party/crashpad/crashpad/util/misc/capture_context_test.cc b/third_party/crashpad/crashpad/util/misc/capture_context_test.cc -index cf23c2deff..5f264bc923 100644 ---- a/third_party/crashpad/crashpad/util/misc/capture_context_test.cc -+++ b/third_party/crashpad/crashpad/util/misc/capture_context_test.cc -@@ -57,7 +57,7 @@ void TestCaptureContext() { - uintptr_t pc = ProgramCounterFromContext(context_1); - - #if !defined(ADDRESS_SANITIZER) && !defined(ARCH_CPU_MIPS_FAMILY) && \ -- !defined(MEMORY_SANITIZER) -+ !defined(MEMORY_SANITIZER) && !defined(ARCH_CPU_PPC64_FAMILY) - // Sanitizers can cause enough code bloat that the “nearby” check would - // likely fail. - const uintptr_t kReferencePC = -diff --git a/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc b/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc -index 9fc5db28c4..5f69f8dced 100644 ---- a/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc -+++ b/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc -@@ -36,6 +36,8 @@ void SanityCheckContext(const NativeCPUContext& context) { - EXPECT_EQ(context.uc_mcontext.regs[0], FromPointerCast(&context)); - #elif defined(ARCH_CPU_MIPS_FAMILY) - EXPECT_EQ(context.uc_mcontext.gregs[4], FromPointerCast(&context)); -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ EXPECT_EQ(context.uc_mcontext.gp_regs[3], FromPointerCast(&context)); - #endif - } - -@@ -50,6 +52,8 @@ uintptr_t ProgramCounterFromContext(const NativeCPUContext& context) { - return context.uc_mcontext.pc; - #elif defined(ARCH_CPU_MIPS_FAMILY) - return context.uc_mcontext.pc; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ return context.uc_mcontext.gp_regs[PT_NIP]; - #endif - } - -@@ -64,6 +68,8 @@ uintptr_t StackPointerFromContext(const NativeCPUContext& context) { - return context.uc_mcontext.sp; - #elif defined(ARCH_CPU_MIPS_FAMILY) - return context.uc_mcontext.gregs[29]; -+#elif defined(ARCH_CPU_PPC64_FAMILY) -+ return context.uc_mcontext.gp_regs[1]; - #endif - } - -diff --git a/third_party/crashpad/crashpad/util/posix/signals_test.cc b/third_party/crashpad/crashpad/util/posix/signals_test.cc -index d91e3cc662..b1ffc7b15a 100644 ---- a/third_party/crashpad/crashpad/util/posix/signals_test.cc -+++ b/third_party/crashpad/crashpad/util/posix/signals_test.cc -@@ -46,12 +46,12 @@ bool CanCauseSignal(int sig) { - return sig == SIGABRT || - sig == SIGALRM || - sig == SIGBUS || --#if !defined(ARCH_CPU_ARM64) -+#if !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64) - sig == SIGFPE || --#endif // !defined(ARCH_CPU_ARM64) -+#endif // !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64) - #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL) - sig == SIGILL || --#endif // defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL -+#endif // defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL) - sig == SIGPIPE || - sig == SIGSEGV || - #if defined(OS_MACOSX) -@@ -117,9 +117,11 @@ void CauseSignal(int sig) { - break; - } - --#if !defined(ARCH_CPU_ARM64) -+#if !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64) - // ARM64 has hardware integer division instructions that don’t generate a - // trap for divide-by-zero, so this doesn’t produce SIGFPE. -+ // -+ // PPC64 fixed-point division by zero also doesn't produce a SIGFPE. - case SIGFPE: { - // Optimization makes this tricky, so get zero from a system call likely - // to succeed, and try to do something with the result. -@@ -137,7 +139,7 @@ void CauseSignal(int sig) { - fstat(quotient, &stat_buf); - break; - } --#endif // ARCH_CPU_ARM64 -+#endif // !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64) - - #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL) - case SIGILL: { -diff --git a/third_party/dav1d/BUILD.gn b/third_party/dav1d/BUILD.gn -index 37ced877cb..be8ae8304e 100644 ---- a/third_party/dav1d/BUILD.gn -+++ b/third_party/dav1d/BUILD.gn -@@ -233,6 +233,21 @@ if (current_cpu == "x86" || current_cpu == "x64") { - ":dav1d_config", - ] - -+ cflags = dav1d_copts -+ } -+} else if (current_cpu == "ppc64") { -+ static_library("dav1d_ppc") { -+ sources = [ -+ "libdav1d/src/ppc/cpu.c", -+ "libdav1d/src/ppc/cpu.h", -+ ] -+ -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ -+ "//build/config/compiler:no_chromium_code", -+ ":dav1d_config", -+ ] -+ - cflags = dav1d_copts - } - } -@@ -262,5 +277,7 @@ static_library("dav1d") { - } - } else if (current_cpu == "arm" || current_cpu == "arm64") { - deps += [ ":dav1d_arm" ] -+ } else if (current_cpu == "ppc64") { -+ deps += [ ":dav1d_ppc" ] - } - } -diff --git a/third_party/dav1d/config/linux/ppc64/config.h b/third_party/dav1d/config/linux/ppc64/config.h -new file mode 100644 -index 0000000000..f6ca57f7f0 ---- /dev/null -+++ b/third_party/dav1d/config/linux/ppc64/config.h -@@ -0,0 +1,35 @@ -+/* -+ * Autogenerated by the Meson build system. -+ * Do not edit, your changes will be lost. -+ */ -+ -+#pragma once -+ -+#define ARCH_AARCH64 0 -+ -+#define ARCH_ARM 0 -+ -+#define ARCH_PPC64LE 1 -+ -+#define ARCH_X86 0 -+ -+#define ARCH_X86_32 0 -+ -+#define ARCH_X86_64 0 -+ -+#define CONFIG_16BPC 1 -+ -+#define CONFIG_8BPC 1 -+ -+#define CONFIG_LOG 1 -+ -+#define ENDIANNESS_BIG 0 -+ -+#define HAVE_ASM 1 -+ -+#define HAVE_GETAUXVAL 1 -+ -+#define HAVE_POSIX_MEMALIGN 1 -+ -+#define HAVE_UNISTD_H 1 -+ -diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn -index 599b9d1fe4..a98acb9b58 100644 ---- a/third_party/libvpx/BUILD.gn -+++ b/third_party/libvpx/BUILD.gn -@@ -38,6 +38,8 @@ if (current_cpu == "x86") { - - if (is_nacl) { - platform_include_dir = "source/config/nacl" -+} else if (current_cpu == "ppc64") { -+ platform_include_dir = "source/config/linux/generic" - } else { - # The mac configurations are currently a relic. They were useful when - # x86inc.asm did not work for MACH_O but now the build is identical to the -@@ -340,6 +342,8 @@ static_library("libvpx") { - } else { - sources = libvpx_srcs_arm64 - } -+ } else if (current_cpu == "ppc64") { -+ sources = libvpx_srcs_generic - } - - configs -= [ "//build/config/compiler:chromium_code" ] -diff --git a/third_party/lss/linux_syscall_support.h b/third_party/lss/linux_syscall_support.h -index 9276f5627a..bc317ca33a 100644 ---- a/third_party/lss/linux_syscall_support.h -+++ b/third_party/lss/linux_syscall_support.h -@@ -3905,7 +3905,7 @@ struct kernel_statfs { - LSS_REG(2, buf); - LSS_BODY(void*, mmap2, "0"(__r2)); - } --#else -+#elif !defined(__powerpc64__) /* ppc64 doesn't have mmap2 */ - #define __NR__mmap2 __NR_mmap2 - LSS_INLINE _syscall6(void*, _mmap2, void*, s, - size_t, l, int, p, -@@ -4036,7 +4036,7 @@ struct kernel_statfs { - #if defined(__i386__) || \ - defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ - (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \ -- defined(__PPC__) || \ -+ (defined(__PPC__) && !defined(__powerpc64__)) || \ - (defined(__s390__) && !defined(__s390x__)) - /* On these architectures, implement mmap() with mmap2(). */ - LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, -diff --git a/third_party/pffft/src/pffft.c b/third_party/pffft/src/pffft.c -index bdac4d7849..51e0f2cacc 100644 ---- a/third_party/pffft/src/pffft.c -+++ b/third_party/pffft/src/pffft.c -@@ -100,6 +100,7 @@ - Altivec support macros - */ - #if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__)) -+#include - typedef vector float v4sf; - # define SIMD_SZ 4 - # define VZERO() ((vector float) vec_splat_u8(0)) -diff --git a/third_party/skia/src/sksl/SkSLString.cpp b/third_party/skia/src/sksl/SkSLString.cpp -index 88eb1c7d3b..4be33fa5bd 100644 ---- a/third_party/skia/src/sksl/SkSLString.cpp -+++ b/third_party/skia/src/sksl/SkSLString.cpp -@@ -240,7 +240,12 @@ String to_string(double value) { - if (needsDotZero) { - buffer << ".0"; - } -- return String(buffer.str().c_str()); -+ -+ std::string ret(buffer.str()); -+ if (signbit(value) && ret[0] == '.') { -+ ret[0] = '-'; -+ } -+ return String(ret.c_str()); - } - - SKSL_INT stoi(const String& s) { -diff --git a/third_party/sqlite/amalgamation/sqlite3.c b/third_party/sqlite/amalgamation/sqlite3.c -index 110a1a7112..5eb339844a 100644 ---- a/third_party/sqlite/amalgamation/sqlite3.c -+++ b/third_party/sqlite/amalgamation/sqlite3.c -@@ -13986,7 +13986,8 @@ typedef INT16_TYPE LogEst; - # if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ - defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ -- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) -+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || \ -+ defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - # define SQLITE_BYTEORDER 1234 - # elif defined(sparc) || defined(__ppc__) || \ - defined(__ARMEB__) || defined(__AARCH64EB__) -diff --git a/third_party/sqlite/patched/ext/rtree/rtree.c b/third_party/sqlite/patched/ext/rtree/rtree.c -index bd8b08eec0..a26801fa95 100644 ---- a/third_party/sqlite/patched/ext/rtree/rtree.c -+++ b/third_party/sqlite/patched/ext/rtree/rtree.c -@@ -425,7 +425,7 @@ struct RtreeMatchArg { - #if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ - defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ -- defined(__arm__) -+ defined(__arm__) || defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - # define SQLITE_BYTEORDER 1234 - #elif defined(sparc) || defined(__ppc__) - # define SQLITE_BYTEORDER 4321 -diff --git a/third_party/sqlite/patched/src/sqliteInt.h b/third_party/sqlite/patched/src/sqliteInt.h -index 0178092955..d3ed564863 100644 ---- a/third_party/sqlite/patched/src/sqliteInt.h -+++ b/third_party/sqlite/patched/src/sqliteInt.h -@@ -833,7 +833,8 @@ typedef INT16_TYPE LogEst; - # if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ - defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ -- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) -+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || \ -+ defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - # define SQLITE_BYTEORDER 1234 - # elif defined(sparc) || defined(__ppc__) || \ - defined(__ARMEB__) || defined(__AARCH64EB__) -diff --git a/third_party/sqlite/sqlite-src-3290000/ext/rtree/rtree.c b/third_party/sqlite/sqlite-src-3290000/ext/rtree/rtree.c -index ea5e737aa3..03b92e3a9d 100644 ---- a/third_party/sqlite/sqlite-src-3290000/ext/rtree/rtree.c -+++ b/third_party/sqlite/sqlite-src-3290000/ext/rtree/rtree.c -@@ -425,7 +425,7 @@ struct RtreeMatchArg { - #if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ - defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ -- defined(__arm__) -+ defined(__arm__) || defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - # define SQLITE_BYTEORDER 1234 - #elif defined(sparc) || defined(__ppc__) - # define SQLITE_BYTEORDER 4321 -diff --git a/third_party/sqlite/sqlite-src-3290000/src/sqliteInt.h b/third_party/sqlite/sqlite-src-3290000/src/sqliteInt.h -index 1c46183312..b732d97e05 100644 ---- a/third_party/sqlite/sqlite-src-3290000/src/sqliteInt.h -+++ b/third_party/sqlite/sqlite-src-3290000/src/sqliteInt.h -@@ -833,7 +833,8 @@ typedef INT16_TYPE LogEst; - # if defined(i386) || defined(__i386__) || defined(_M_IX86) || \ - defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) || \ - defined(_M_AMD64) || defined(_M_ARM) || defined(__x86) || \ -- defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) -+ defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64) || \ -+ defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) - # define SQLITE_BYTEORDER 1234 - # elif defined(sparc) || defined(__ppc__) || \ - defined(__ARMEB__) || defined(__AARCH64EB__) -diff --git a/third_party/swiftshader/src/Yarn/BUILD.gn b/third_party/swiftshader/src/Yarn/BUILD.gn -index 2718ad182e..05885eb7db 100644 ---- a/third_party/swiftshader/src/Yarn/BUILD.gn -+++ b/third_party/swiftshader/src/Yarn/BUILD.gn -@@ -49,6 +49,7 @@ swiftshader_source_set("Yarn_headers") { - "OSFiber_asm_arm.h", - "OSFiber_asm_x64.h", - "OSFiber_asm_x86.h", -+ "OSFiber_asm_ppc64.h", - ] - } - -@@ -73,8 +74,10 @@ swiftshader_source_set("Yarn") { - "OSFiber_asm_arm.S", - "OSFiber_asm_x64.S", - "OSFiber_asm_x86.S", -+ "OSFiber_asm_ppc64.S", - "OSFiber_x64.c", - "OSFiber_x86.c", -+ "OSFiber_ppc64.c", - ] - } - -diff --git a/third_party/swiftshader/src/Yarn/OSFiber_asm.hpp b/third_party/swiftshader/src/Yarn/OSFiber_asm.hpp -index e0fa508a9e..7d6f961248 100644 ---- a/third_party/swiftshader/src/Yarn/OSFiber_asm.hpp -+++ b/third_party/swiftshader/src/Yarn/OSFiber_asm.hpp -@@ -30,6 +30,8 @@ - #include "OSFiber_asm_aarch64.h" - #elif defined(__arm__) - #include "OSFiber_asm_arm.h" -+#elif defined(__powerpc64__) && (_CALL_ELF == 2) -+#include "OSFiber_asm_ppc64.h" - #else - #error "Unsupported target" - #endif -diff --git a/third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.S b/third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.S -new file mode 100644 -index 0000000000..7d464fc12b ---- /dev/null -+++ b/third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.S -@@ -0,0 +1,196 @@ -+// Copyright 2019 The SwiftShader Authors. All Rights Reserved. -+// -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+#if defined(__powerpc64__) -+ -+#define YARN_BUILD_ASM 1 -+#include "OSFiber_asm_ppc64.h" -+ -+// void yarn_fiber_swap(yarn_fiber_context* from, const yarn_fiber_context* to) -+// r3: from -+// r4: to -+.text -+.global yarn_fiber_swap -+.align 4 -+.type yarn_fiber_swap @function -+yarn_fiber_swap: -+ -+ // Save context 'from' -+ -+ // Store non-volatile registers -+ std 1, YARN_REG_R1(4) -+ std 2, YARN_REG_R2(4) -+ std 13, YARN_REG_R13(4) -+ std 14, YARN_REG_R14(4) -+ std 15, YARN_REG_R15(4) -+ std 16, YARN_REG_R16(4) -+ std 17, YARN_REG_R17(4) -+ std 18, YARN_REG_R18(4) -+ std 19, YARN_REG_R19(4) -+ std 20, YARN_REG_R20(4) -+ std 21, YARN_REG_R21(4) -+ std 22, YARN_REG_R22(4) -+ std 23, YARN_REG_R23(4) -+ std 24, YARN_REG_R24(4) -+ std 25, YARN_REG_R25(4) -+ std 26, YARN_REG_R26(4) -+ std 27, YARN_REG_R27(4) -+ std 28, YARN_REG_R28(4) -+ std 29, YARN_REG_R29(4) -+ std 30, YARN_REG_R30(4) -+ std 31, YARN_REG_R31(4) -+ -+ // Store special registers -+ mflr 5 -+ std 5, YARN_REG_LR(4) -+ mfcr 5 -+ std 5, YARN_REG_CCR(4) -+ -+ // Store non-volatile floating point registers -+ stfd 14, YARN_REG_FPRS+0x10(4) -+ stfd 15, YARN_REG_FPRS+0x18(4) -+ stfd 16, YARN_REG_FPRS+0x20(4) -+ stfd 17, YARN_REG_FPRS+0x28(4) -+ stfd 18, YARN_REG_FPRS+0x30(4) -+ stfd 19, YARN_REG_FPRS+0x38(4) -+ stfd 20, YARN_REG_FPRS+0x40(4) -+ stfd 21, YARN_REG_FPRS+0x48(4) -+ stfd 22, YARN_REG_FPRS+0x50(4) -+ stfd 23, YARN_REG_FPRS+0x58(4) -+ stfd 24, YARN_REG_FPRS+0x60(4) -+ stfd 25, YARN_REG_FPRS+0x68(4) -+ stfd 26, YARN_REG_FPRS+0x70(4) -+ stfd 27, YARN_REG_FPRS+0x78(4) -+ stfd 28, YARN_REG_FPRS+0x80(4) -+ stfd 29, YARN_REG_FPRS+0x88(4) -+ stfd 30, YARN_REG_FPRS+0x90(4) -+ stfd 31, YARN_REG_FPRS+0x98(4) -+ -+ // Store non-volatile altivec registers -+#ifdef __ALTIVEC__ -+ li 5, YARN_REG_VMX -+ stvxl 20, 4, 5 -+ addi 5, 5, 16 -+ stvxl 21, 4, 5 -+ addi 5, 5, 16 -+ stvxl 22, 4, 5 -+ addi 5, 5, 16 -+ stvxl 23, 4, 5 -+ addi 5, 5, 16 -+ stvxl 24, 4, 5 -+ addi 5, 5, 16 -+ stvxl 25, 4, 5 -+ addi 5, 5, 16 -+ stvxl 26, 4, 5 -+ addi 5, 5, 16 -+ stvxl 27, 4, 5 -+ addi 5, 5, 16 -+ stvxl 28, 4, 5 -+ addi 5, 5, 16 -+ stvxl 29, 4, 5 -+ addi 5, 5, 16 -+ stvxl 30, 4, 5 -+ addi 5, 5, 16 -+ stvxl 31, 4, 5 -+ addi 5, 5, 16 -+ -+ mfvrsave 5 -+ stw 5, YARN_REG_VRSAVE(4) -+#endif // __ALTIVEC__ -+ -+ // Load non-volatile registers -+ ld 1, YARN_REG_R1(3) -+ ld 2, YARN_REG_R2(3) -+ ld 13, YARN_REG_R13(3) -+ ld 14, YARN_REG_R14(3) -+ ld 15, YARN_REG_R15(3) -+ ld 16, YARN_REG_R16(3) -+ ld 17, YARN_REG_R17(3) -+ ld 18, YARN_REG_R18(3) -+ ld 19, YARN_REG_R19(3) -+ ld 20, YARN_REG_R20(3) -+ ld 21, YARN_REG_R21(3) -+ ld 22, YARN_REG_R22(3) -+ ld 23, YARN_REG_R23(3) -+ ld 24, YARN_REG_R24(3) -+ ld 25, YARN_REG_R25(3) -+ ld 26, YARN_REG_R26(3) -+ ld 27, YARN_REG_R27(3) -+ ld 28, YARN_REG_R28(3) -+ ld 29, YARN_REG_R29(3) -+ ld 30, YARN_REG_R30(3) -+ ld 31, YARN_REG_R31(3) -+ -+ // Load non-volatile floating point registers -+ lfd 14, YARN_REG_FPRS+0x10(3) -+ lfd 15, YARN_REG_FPRS+0x18(3) -+ lfd 16, YARN_REG_FPRS+0x20(3) -+ lfd 17, YARN_REG_FPRS+0x28(3) -+ lfd 18, YARN_REG_FPRS+0x30(3) -+ lfd 19, YARN_REG_FPRS+0x38(3) -+ lfd 20, YARN_REG_FPRS+0x40(3) -+ lfd 21, YARN_REG_FPRS+0x48(3) -+ lfd 22, YARN_REG_FPRS+0x50(3) -+ lfd 23, YARN_REG_FPRS+0x58(3) -+ lfd 24, YARN_REG_FPRS+0x60(3) -+ lfd 25, YARN_REG_FPRS+0x68(3) -+ lfd 26, YARN_REG_FPRS+0x70(3) -+ lfd 27, YARN_REG_FPRS+0x78(3) -+ lfd 28, YARN_REG_FPRS+0x80(3) -+ lfd 29, YARN_REG_FPRS+0x88(3) -+ lfd 30, YARN_REG_FPRS+0x90(3) -+ lfd 31, YARN_REG_FPRS+0x98(3) -+ -+ // Load non-volatile altivec registers -+#ifdef __ALTIVEC__ -+ li 5, YARN_REG_VMX -+ lvxl 20, 3, 5 -+ addi 5, 5, 16 -+ lvxl 21, 3, 5 -+ addi 5, 5, 16 -+ lvxl 22, 3, 5 -+ addi 5, 5, 16 -+ lvxl 23, 3, 5 -+ addi 5, 5, 16 -+ lvxl 24, 3, 5 -+ addi 5, 5, 16 -+ lvxl 25, 3, 5 -+ addi 5, 5, 16 -+ lvxl 26, 3, 5 -+ addi 5, 5, 16 -+ lvxl 27, 3, 5 -+ addi 5, 5, 16 -+ lvxl 28, 3, 5 -+ addi 5, 5, 16 -+ lvxl 29, 3, 5 -+ addi 5, 5, 16 -+ lvxl 30, 3, 5 -+ addi 5, 5, 16 -+ lvxl 31, 3, 5 -+ addi 5, 5, 16 -+ -+ lwz 5, YARN_REG_VRSAVE(3) -+ mtvrsave 5 -+#endif // __ALTIVEC__ -+ -+ // Load parameters and entrypoint -+ ld 12, YARN_REG_LR(3) -+ ld 4, YARN_REG_R4(3) -+ ld 3, YARN_REG_R3(3) -+ mtlr 12 -+ -+ // Branch to entrypoint -+ blr -+ -+#endif // defined(__powerpc64__) -diff --git a/third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.h b/third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.h -new file mode 100644 -index 0000000000..5f9b108229 ---- /dev/null -+++ b/third_party/swiftshader/src/Yarn/OSFiber_asm_ppc64.h -@@ -0,0 +1,133 @@ -+// Copyright 2019 The SwiftShader Authors. All Rights Reserved. -+// -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+#define YARN_REG_R1 0x00 -+#define YARN_REG_R2 0x08 -+#define YARN_REG_R13 0x10 -+#define YARN_REG_R14 0x18 -+#define YARN_REG_R15 0x20 -+#define YARN_REG_R16 0x28 -+#define YARN_REG_R17 0x30 -+#define YARN_REG_R18 0x38 -+#define YARN_REG_R19 0x40 -+#define YARN_REG_R20 0x48 -+#define YARN_REG_R21 0x50 -+#define YARN_REG_R22 0x58 -+#define YARN_REG_R23 0x60 -+#define YARN_REG_R24 0x68 -+#define YARN_REG_R25 0x70 -+#define YARN_REG_R26 0x78 -+#define YARN_REG_R27 0x80 -+#define YARN_REG_R28 0x88 -+#define YARN_REG_R29 0x90 -+#define YARN_REG_R30 0x98 -+#define YARN_REG_R31 0xa0 -+ -+#define YARN_REG_R12 0xa8 -+ -+#define YARN_REG_R3 0xb0 -+#define YARN_REG_R4 0xb8 -+ -+#define YARN_REG_LR 0xc0 -+#define YARN_REG_CCR 0xc8 -+ -+#define YARN_REG_FPRS 0xd0 -+#define YARN_REG_VMX 0x160 -+#define YARN_REG_VRSAVE 0x220 -+ -+#ifndef YARN_BUILD_ASM -+ -+#include -+ -+struct yarn_fiber_context -+{ -+ // non-volatile registers -+ uintptr_t r1; -+ uintptr_t r2; -+ uintptr_t r13; -+ uintptr_t r14; -+ uintptr_t r15; -+ uintptr_t r16; -+ uintptr_t r17; -+ uintptr_t r18; -+ uintptr_t r19; -+ uintptr_t r20; -+ uintptr_t r21; -+ uintptr_t r22; -+ uintptr_t r23; -+ uintptr_t r24; -+ uintptr_t r25; -+ uintptr_t r26; -+ uintptr_t r27; -+ uintptr_t r28; -+ uintptr_t r29; -+ uintptr_t r30; -+ uintptr_t r31; -+ -+ // function entrypoint register (r12) -+ uintptr_t r12; -+ -+ // first two parameter registers (r3, r4) -+ uintptr_t r3; -+ uintptr_t r4; -+ -+ // special registers -+ uintptr_t lr; -+ uintptr_t ccr; -+ -+ // non-volatile floating-point registers (f14-f31) -+ uintptr_t fprs[18]; -+ -+ // non-volatile altivec registers -+ uintptr_t vmx[12 * 2]; -+ uint32_t vrsave; -+}; -+ -+// Only the ELFv2 ABI is supported for now -+#if !defined(_CALL_ELF) || (_CALL_ELF != 2) -+#error "Only the ppc64 ELFv2 ABI is supported." -+#endif -+ -+#ifdef __cplusplus -+#include -+static_assert(offsetof(yarn_fiber_context, r1) == YARN_REG_R1, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r2) == YARN_REG_R2, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r12) == YARN_REG_R12, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r13) == YARN_REG_R13, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r15) == YARN_REG_R15, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r16) == YARN_REG_R16, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r17) == YARN_REG_R17, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r18) == YARN_REG_R18, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r19) == YARN_REG_R19, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r20) == YARN_REG_R20, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r21) == YARN_REG_R21, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r22) == YARN_REG_R22, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r23) == YARN_REG_R23, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r24) == YARN_REG_R24, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r25) == YARN_REG_R25, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r26) == YARN_REG_R26, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r27) == YARN_REG_R27, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r28) == YARN_REG_R28, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r29) == YARN_REG_R29, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r30) == YARN_REG_R30, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r31) == YARN_REG_R31, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, r14) == YARN_REG_R14, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, lr) == YARN_REG_LR, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, ccr) == YARN_REG_CCR, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, fprs) == YARN_REG_FPRS, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, vmx) == YARN_REG_VMX, "Bad register offset"); -+static_assert(offsetof(yarn_fiber_context, vrsave) == YARN_REG_VRSAVE, "Bad register offset"); -+#endif // __cplusplus -+ -+#endif // YARN_BUILD_ASM -diff --git a/third_party/swiftshader/src/Yarn/OSFiber_ppc64.c b/third_party/swiftshader/src/Yarn/OSFiber_ppc64.c -new file mode 100644 -index 0000000000..b0efeaf01a ---- /dev/null -+++ b/third_party/swiftshader/src/Yarn/OSFiber_ppc64.c -@@ -0,0 +1,42 @@ -+// Copyright 2019 The SwiftShader Authors. All Rights Reserved. -+// -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+#if defined(__powerpc64__) -+ -+#include "OSFiber_asm_ppc64.h" -+ -+void yarn_fiber_trampoline(void(*target)(void*), void* arg) -+{ -+ target(arg); -+} -+ -+void yarn_fiber_set_target(struct yarn_fiber_context* ctx, void* stack, uint32_t stack_size, void(*target)(void*), void* arg) -+{ -+ uintptr_t stack_top = (uintptr_t)((uint8_t*)(stack) + stack_size); -+ if ((stack_top % 16) != 0) -+ stack_top -= (stack_top % 16); -+ -+ // Write a NULL backchain and subtract a minimum stack frame size (32) -+ *(uintptr_t *)stack_top = 0; -+ stack_top -= 32; -+ *(uintptr_t *)stack_top = stack_top + 32; -+ -+ // Load registers -+ ctx->r1 = stack_top; -+ ctx->lr = (uintptr_t)yarn_fiber_trampoline; -+ ctx->r3 = (uintptr_t)target; -+ ctx->r4 = (uintptr_t)arg; -+} -+ -+#endif // __powerpc64__ -diff --git a/third_party/webrtc/modules/desktop_capture/differ_block.cc b/third_party/webrtc/modules/desktop_capture/differ_block.cc -index dd9ab457e0..c005d95990 100644 ---- a/third_party/webrtc/modules/desktop_capture/differ_block.cc -+++ b/third_party/webrtc/modules/desktop_capture/differ_block.cc -@@ -30,11 +30,7 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) { - static bool (*diff_proc)(const uint8_t*, const uint8_t*) = nullptr; - - if (!diff_proc) { --#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY) -- // For ARM and MIPS processors, always use C version. -- // TODO(hclam): Implement a NEON version. -- diff_proc = &VectorDifference_C; --#else -+#if defined(WEBRTC_ARCH_X86_FAMILY) - bool have_sse2 = WebRtc_GetCPUInfo(kSSE2) != 0; - // For x86 processors, check if SSE2 is supported. - if (have_sse2 && kBlockSize == 32) { -@@ -44,6 +40,10 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) { - } else { - diff_proc = &VectorDifference_C; - } -+#else -+ // For other processors, always use C version. -+ // TODO(hclam): Implement a NEON version. -+ diff_proc = &VectorDifference_C; - #endif - } - -diff --git a/third_party/webrtc/rtc_base/system/arch.h b/third_party/webrtc/rtc_base/system/arch.h -index eb77ffa8f4..e60b81a057 100644 ---- a/third_party/webrtc/rtc_base/system/arch.h -+++ b/third_party/webrtc/rtc_base/system/arch.h -@@ -50,6 +50,18 @@ - #elif defined(__EMSCRIPTEN__) - #define WEBRTC_ARCH_32_BITS - #define WEBRTC_ARCH_LITTLE_ENDIAN -+#elif defined(__PPC__) -+#define WEBRTC_ARCH_PPC_FAMILY -+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#else -+#define WEBRTC_ARCH_BIG_ENDIAN -+#endif -+#if defined(__LP64__) -+#define WEBRTC_ARCH_64_BITS -+#else -+#define WEBRTC_ARCH_32_BITS -+#endif - #else - #error Please add support for your architecture in rtc_base/system/arch.h - #endif -diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn -index 4657246ecf..fd0cb00dac 100644 ---- a/ui/gl/BUILD.gn -+++ b/ui/gl/BUILD.gn -@@ -16,7 +16,8 @@ declare_args() { - is_chromeos || is_fuchsia) && - (target_cpu == "x86" || target_cpu == "x64" || - target_cpu == "arm" || target_cpu == "arm64" || -- target_cpu == "mipsel" || target_cpu == "mips64el") -+ target_cpu == "mipsel" || target_cpu == "mips64el" || -+ target_cpu == "ppc64") - - # Whether service side logging (actual calls into the GL driver) is enabled - # or not. -diff --git a/v8/BUILD.gn b/v8/BUILD.gn -index c486f1a1c8..90199198c5 100644 ---- a/v8/BUILD.gn -+++ b/v8/BUILD.gn -@@ -609,6 +609,12 @@ config("toolchain") { - } - if (host_byteorder == "little") { - defines += [ "V8_TARGET_ARCH_PPC_LE" ] -+ cflags += [ -+ # Enable usage of AltiVec, VSX, and other POWER8 and higher features -+ "-mcpu=power8", -+ "-maltivec", -+ "-mvsx", -+ ] - } else if (host_byteorder == "big") { - defines += [ "V8_TARGET_ARCH_PPC_BE" ] - if (current_os == "aix") { -diff --git a/v8/test/BUILD.gn b/v8/test/BUILD.gn -index 6bf9ca643d..422a34b913 100644 ---- a/v8/test/BUILD.gn -+++ b/v8/test/BUILD.gn -@@ -32,7 +32,7 @@ group("gn_all") { - deps += [ - "cctest:cctest", - "cctest:generate-bytecode-expectations", -- "unittests:unittests", -+ #"unittests:unittests", - ] - } - } -@@ -82,7 +82,7 @@ group("v8_bot_default") { - "mjsunit:v8_mjsunit", - "mkgrokdump:mkgrokdump", - "preparser:v8_preparser", -- "unittests:unittests", -+ #"unittests:unittests", - "wasm-api-tests:wasm_api_tests", - "wasm-js:v8_wasm_js", - "wasm-spec-tests:v8_wasm_spec_tests", -@@ -103,7 +103,7 @@ group("v8_default") { - "mjsunit:v8_mjsunit", - "mkgrokdump:mkgrokdump", - "preparser:v8_preparser", -- "unittests:unittests", -+ #"unittests:unittests", - "wasm-api-tests:wasm_api_tests", - "wasm-js:v8_wasm_js", - "wasm-spec-tests:v8_wasm_spec_tests", --- -2.28.0 - diff --git a/srcpkgs/electron7/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch b/srcpkgs/electron7/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch deleted file mode 100644 index 916dba9dc3b..00000000000 --- a/srcpkgs/electron7/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch +++ /dev/null @@ -1,42 +0,0 @@ -From ff4122f236b70c272c746d0c336cdbd588d78cd1 Mon Sep 17 00:00:00 2001 -From: Elvis Pranskevichus -Date: Thu, 12 Dec 2019 16:12:18 -0500 -Subject: [PATCH] Add a script to list patch targets - ---- - script/list_patch_targets.py | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - create mode 100755 script/list_patch_targets.py - -diff --git a/script/list_patch_targets.py b/script/list_patch_targets.py -new file mode 100755 -index 000000000..55173bac9 ---- /dev/null -+++ b/script/list_patch_targets.py -@@ -0,0 +1,23 @@ -+#!/usr/bin/env python -+ -+import argparse -+import json -+ -+ -+def parse_args(): -+ parser = argparse.ArgumentParser(description='Apply Electron patches') -+ parser.add_argument('config', nargs='+', -+ type=argparse.FileType('r'), -+ help='patches\' config(s) in the JSON format') -+ return parser.parse_args() -+ -+ -+def main(): -+ configs = parse_args().config -+ for config_json in configs: -+ for patch_dir, repo in json.load(config_json).iteritems(): -+ print(repo) -+ -+ -+if __name__ == '__main__': -+ main() --- -2.23.0 - diff --git a/srcpkgs/electron7/files/patches/electron-Build-fixes.patch.patch b/srcpkgs/electron7/files/patches/electron-Build-fixes.patch.patch deleted file mode 100644 index a591c2edf62..00000000000 --- a/srcpkgs/electron7/files/patches/electron-Build-fixes.patch.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/build/args/all.gn b/build/args/all.gn -index 8bbb86e28..8476d09ea 100644 ---- a/build/args/all.gn -+++ b/build/args/all.gn -@@ -1,5 +1,4 @@ - is_electron_build = true --use_jumbo_build = true - root_extra_deps = [ "//electron" ] - - # Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json -diff --git a/build/args/release.gn b/build/args/release.gn -index e5017f6e1..59207b389 100644 ---- a/build/args/release.gn -+++ b/build/args/release.gn -@@ -1,6 +1,4 @@ - import("all.gn") --is_component_build = false --is_official_build = true - - # This may be guarded behind is_chrome_branded alongside - # proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321, -@@ -8,9 +6,3 @@ is_official_build = true - # The initialization of the decoder depends on whether ffmpeg has - # been built with H.264 support. - rtc_use_h264 = proprietary_codecs -- --# By default, Electron builds ffmpeg with proprietary codecs enabled. In order --# to facilitate users who don't want to ship proprietary codecs in ffmpeg, or --# who have an LGPL requirement to ship ffmpeg as a dynamically linked library, --# we build ffmpeg as a shared library. --is_component_ffmpeg = true -diff --git a/build/npm.gni b/build/npm.gni -index a1987d095..fb33a14c3 100644 ---- a/build/npm.gni -+++ b/build/npm.gni -@@ -35,7 +35,6 @@ template("npm_action") { - if (!defined(deps)) { - deps = [] - } -- deps += [ ":npm_pre_flight_" + target_name ] - - script = "//electron/build/npm-run.py" - args = [ -diff --git a/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch b/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch -index 0dc9916be..7eaa46bf5 100644 ---- a/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch -+++ b/patches/node/fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch -@@ -30,7 +30,7 @@ - + # these values being accurate. - + 'build_v8_with_gn': 'false', - + 'enable_lto%': 'false', --+ -++ 'openssl_fips': '', - 'conditions': [ - ['target_arch=="arm64"', { - # Disabled pending https://github.com/nodejs/node/issues/23913. - diff --git a/srcpkgs/electron7/files/patches/electron-dont-assume-python-is-python2.patch b/srcpkgs/electron7/files/patches/electron-dont-assume-python-is-python2.patch deleted file mode 100644 index fb134748025..00000000000 --- a/srcpkgs/electron7/files/patches/electron-dont-assume-python-is-python2.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/build/zip.py.orig 2020-04-27 17:59:53.499281667 +0200 -+++ b/build/zip.py 2020-04-27 17:59:57.655839143 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - from __future__ import print_function - import os - import subprocess - ---- a/build/npm-run.py.orig 2020-04-27 17:59:50.829351807 +0200 -+++ b/build/npm-run.py 2020-04-27 18:00:02.702373256 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - from __future__ import print_function - import os - import subprocess diff --git a/srcpkgs/electron7/files/patches/electron-fix-includes.patch b/srcpkgs/electron7/files/patches/electron-fix-includes.patch deleted file mode 100644 index 9df1fd6946d..00000000000 --- a/srcpkgs/electron7/files/patches/electron-fix-includes.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch.orig 2020-04-27 16:37:09.934271227 +0200 -+++ b/patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch 2020-04-27 16:37:50.903207166 +0200 -@@ -350,7 +350,7 @@ - index 0000000000000000000000000000000000000000..3865939d0445a23a468770f57207ba5ef23277ed - --- /dev/null - +++ b/components/viz/service/display_embedder/software_output_device_proxy.h --@@ -0,0 +1,88 @@ -+@@ -0,0 +1,89 @@ - +// 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. -@@ -364,6 +364,7 @@ - + - +#include - + -++#include "base/threading/thread_checker.h" - +#include "components/viz/host/host_display_client.h" - +#include "components/viz/service/display/software_output_device.h" - +#include "components/viz/service/viz_service_export.h" diff --git a/srcpkgs/electron7/files/patches/electron-mjsunit-not-exsit.patch.patch b/srcpkgs/electron7/files/patches/electron-mjsunit-not-exsit.patch.patch deleted file mode 100644 index 2567540869c..00000000000 --- a/srcpkgs/electron7/files/patches/electron-mjsunit-not-exsit.patch.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch b/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch -index bafd0b0..949cb2d 100644 ---- a/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch -+++ b/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch -@@ -25,42 +25,3 @@ index f75014d034626643ae83dc8f167a473b7291522c..b5c2e8b25f10f2fff9011a0a1bd1aeef - } - - // Build the source string. --diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status --index 134a49f7480c87acbb08133a2d6a4d028bbdd090..7dcaa412199770d7c4f688d7f8a66d887130bf82 100644 ----- a/test/mjsunit/mjsunit.status --+++ b/test/mjsunit/mjsunit.status --@@ -232,6 +232,9 @@ -- # BUG(v8:6306). -- 'wasm/huge-memory': [SKIP], -- --+ # Needs to be adapted after changes to Function constructor. chromium:1065094 --+ 'cross-realm-filtering': [SKIP], --+ -- # Allocates a huge string and then flattens it, very slow in debug mode. -- 'regress/regress-752764': [PASS, ['mode == debug', SLOW]], -- --diff --git a/test/mjsunit/regress-1065094.js b/test/mjsunit/regress-1065094.js --new file mode 100644 --index 0000000000000000000000000000000000000000..365e20285bb0505dec3f84c4df57db0525e7acc3 ----- /dev/null --+++ b/test/mjsunit/regress-1065094.js --@@ -0,0 +1,19 @@ --+// Copyright 2020 the V8 project authors. All rights reserved. --+// Use of this source code is governed by a BSD-style license that can be --+// found in the LICENSE file. --+ --+// Flags: --allow-natives-syntax --+ --+function f(fnConstructor) { --+ return Object.is(new fnConstructor(), undefined); --+} --+ --+const realmIndex = Realm.createAllowCrossRealmAccess(); --+const otherFunction = Realm.global(realmIndex).Function; --+Realm.detachGlobal(realmIndex); --+ --+%PrepareFunctionForOptimization(f); --+assertFalse(f(Function)); --+assertThrows(_ => f(otherFunction)); --+%OptimizeFunctionOnNextCall(f); --+assertThrows(_ => f(otherFunction)); diff --git a/srcpkgs/electron7/template b/srcpkgs/electron7/template deleted file mode 100644 index 653f183aba7..00000000000 --- a/srcpkgs/electron7/template +++ /dev/null @@ -1,341 +0,0 @@ -# Template file for 'electron7' -pkgname=electron7 -version=7.3.3 -revision=1 -_nodever=12.8.1 -_chromiumver=78.0.3904.108 -archs="x86_64* aarch64* ppc64le* i686*" -create_wrksrc=yes -build_wrksrc="src" -hostmakedepends="$(vopt_if clang clang) yasm python pkgconf perl gperf bison ninja nodejs hwids - libwebp-devel freetype-devel harfbuzz-devel libpng-devel nss-devel which git libevent-devel - pciutils-devel libatomic-devel ffmpeg-devel libxml2-devel libglib-devel yarn openjdk libxslt-devel - opus-devel libXcursor-devel libXcomposite-devel libXtst-devel libXrandr-devel libXScrnSaver-devel - alsa-lib-devel re2-devel snappy-devel mit-krb5-devel" -makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel - libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel - libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel - libXScrnSaver-devel alsa-lib-devel snappy-devel libdrm-devel - libxml2-devel libxslt-devel $(vopt_if pulseaudio pulseaudio-devel) libexif-devel - libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel - libjpeg-turbo-devel libevent-devel json-c-devel harfbuzz-devel - minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel - re2-devel fontconfig-devel freetype-devel opus-devel libatomic-devel - ffmpeg-devel libva-devel libuv-devel c-ares-devel libnotify-devel" -short_desc="Application development framework based on web technologies" -maintainer="John " -license="BSD-3-Clause" -homepage="https://electronjs.org" -distfiles="https://github.com/electron/electron/archive/v$version.tar.gz>electron-${version}.tar.gz - https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$_chromiumver.tar.xz - https://github.com/nodejs/node/archive/v$_nodever.tar.gz>node-$_nodever.tar.gz" -checksum="cd216520c38d9669d37704a401e85a88eb5c9e4811cfc1fee37e92acbb54a180 - f9c53839f306d2973de27723360024f7904101d426b9e7e9cdb56e8bcc775b0e - 11648d586f68ee5fc38e4cadf3974541aac4a67709fa028e9075aff42e28d9b9" - -no_generic_pkgconfig_link=yes -lib32disabled=yes -nodebug=yes -nopie=yes # contains tools that are not PIE, enables PIE itself - -# XXX: pulseaudio broken at compile time -build_options="pulseaudio clang" -build_options_default="pulseaudio" - -if [ -z "$CROSS_BUILD" ]; then - build_options_default+=" clang" -fi - -if [ "$build_option_clang" ]; then - nocross="No proper setup for using clang as cross compiler in void yet" -elif [ "$CROSS_BUILD" ] && [ "${XBPS_TARGET_MACHINE%%-musl}" = "aarch64" ]; then - broken="{standard input}: Error: unaligned opcodes detected in executable segment" - # This might also happen with non-cross gcc? -fi - -_buildtype=Release -_is_debug=false - -CFLAGS="-Wno-unknown-warning-option -fPIC" -CXXFLAGS="-Wno-unknown-warning-option -fPIC" - -_apply_patch() { - local args="$1" pname="$(basename $2)" - - if [ ! -f ".${pname}_done" ]; then - msg_normal "$pkgver: patching: ${pname}.\n" - patch -N $args -i $2 - touch .${pname}_done - fi -} - -_get_chromium_arch() { - case "$1" in - x86_64*) echo x64 ;; - i686*) echo x86 ;; - arm*) echo arm ;; - aarch64*) echo arm64 ;; - ppc64*) echo ppc64 ;; - ppc*) echo ppc ;; - mipsel*) echo mipsel ;; - mips*) echo mips ;; - *) msg_error "$pkgver: cannot be compiled for ${XBPS_TARGET_MACHINE}.\n" ;; - esac -} - -post_extract() { - ln -s chromium-$_chromiumver src - mkdir -p src/third_party/ - ln -s ../../node-$_nodever src/third_party/electron_node - ln -s ../electron-${version} src/electron - -} - -post_patch() { - cd $wrksrc - for x in $FILESDIR/patches/*; do - case "${x##*/}" in - electron*.patch) - cd src/electron - _apply_patch -p1 "$x" - cd "$wrksrc";; - esac - done - - # Sigh, electron uses git am... - python2 src/electron/script/list_patch_targets.py src/electron/patches/config.json | while read -r repopath; do - cd "$wrksrc"/"$repopath" - git init -q - git config "gc.auto" 0 - if [ "$repopath" != "src" ]; then - echo "/${repopath#src/}" >> "$wrksrc/$build_wrksrc/.gitignore" - fi - git add . - git -c 'user.name=Electron build' -c 'user.email=electron@ebuild' \ - commit -q -m "." || true - done - cd $wrksrc - python2 src/electron/script/apply_all_patches.py src/electron/patches/config.json - - for x in $FILESDIR/patches/*; do - case "${x##*/}" in - chromium*.patch) - cd src - _apply_patch -p1 "$x" - cd "$wrksrc";; - esac - done - - if [ "$XBPS_TARGET_LIBC" = "musl" ]; then - for x in $FILESDIR/musl-patches/*; do - case "${x##*/}" in - chromium*.patch) - cd src - _apply_patch -p1 "$x" - cd "$wrksrc";; - electron*.patch) - cd src/electron - _apply_patch -p1 "$x" - cd "$wrksrc";; - esac - done - fi -} - -pre_configure() { - cd "$wrksrc/$build_wrksrc" - - # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion - touch chrome/test/data/webui/i18n_process_css_test.html - # Use the file at run time instead of effectively compiling it in - sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \ - -i services/device/public/cpp/usb/BUILD.gn - - mkdir -p third_party/node/linux/node-linux-x64/bin - ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ - - # reusable system library settings - local use_system=" - ffmpeg - flac - fontconfig - freetype - harfbuzz-ng - libdrm - libevent - libjpeg - libpng - libwebp - libxml - libxslt - opus - re2 - snappy - yasm - zlib - " - for _lib in $use_system libjpeg_turbo; do - msg_normal "Removing buildscripts for system provided $_lib\n" - find -type f -path "*third_party/$_lib/*" \ - \! -path "*third_party/$_lib/chromium/*" \ - \! -path "*third_party/$_lib/google/*" \ - \! -path './base/third_party/icu/*' \ - \! -path './third_party/libxml/*' \ - \! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \ - \! -path './third_party/yasm/run_yasm.py' \ - \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \ - -delete - done - - - msg_normal "Replacing gn files\n" - python2 build/linux/unbundle/replace_gn_files.py --system-libraries \ - $use_system - third_party/libaddressinput/chromium/tools/update-strings.py -} - -do_configure() { - local target_arch="$(_get_chromium_arch ${XBPS_TARGET_MACHINE})" - local host_arch="$(_get_chromium_arch ${XBPS_MACHINE})" - # the build system will set march for use, adding it to cflags will break builds - export CXXFLAGS=$( shopt -s extglob; echo ${CXXFLAGS/-march=*([^ ])} ) - export CFLAGS=$( shopt -s extglob; echo ${CFLAGS/-march=*([^ ])} ) - local conf=() - cd third_party/electron_node - if [ "$CROSS_BUILD" ]; then - conf_args=" --dest-cpu=${target_arch} --cross-compiling" - fi - ./configure --prefix=/usr \ - --shared-zlib \ - --shared-libuv \ - --shared-openssl \ - --shared-cares \ - --openssl-use-def-ca-store \ - --without-npm \ - --without-dtrace \ - --without-bundled-v8 \ - ${conf_args} - - cd "$wrksrc/$build_wrksrc"/electron - yarn install - cd "$wrksrc/$build_wrksrc" - - if [ "$build_option_clang" ]; then - export CC=clang - export CXX=clang++ - export HOST_CC=clang - export HOST_CXX=clang++ - else - export CXXFLAGS="$CXXFLAGS -fpermissive" - export BUILD_CXXFLAGS="$BUILD_CXXFLAGS -fpermissive" - export BUILD_AR="$AR_host" - export BUILD_NM="$NM_host" - fi - - # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) - # Note: These are for Void Linux use ONLY. - conf+=( - 'google_api_key="AIzaSyA9gWazKaHaNIPPg2hrMj6_ZSG8AFmq738"' - 'google_default_client_id="126659149423-hoo6ickbk3p1u2qjsdsp0ddciurfvb4t.apps.googleusercontent.com"' - 'google_default_client_secret="_ozIx2D-DKm_se_2NPwV4l5b"' - ) - - conf+=( - 'blink_symbol_level=0' - 'clang_use_chrome_plugins=false' - 'closure_compile=true' - 'custom_toolchain="//build/toolchain/linux/unbundle:default"' - ) - if [ "$CROSS_BUILD" ]; then - conf+=( - 'host_toolchain="//build/toolchain/linux/unbundle:host"' - 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"' - "host_pkg_config=\"$PKG_CONFIG_FOR_BUILD\"" - "pkg_config=\"$PKG_CONFIG\"" - ) - else - conf+=( - 'host_toolchain="//build/toolchain/linux/unbundle:default"' - 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:default"' - ) - fi - conf+=( - 'enable_hangout_services_extension=true' - 'enable_nacl_nonsfi=false' - 'enable_nacl=false' - 'enable_precompiled_headers=false' - 'fatal_linker_warnings=false' - 'ffmpeg_branding="Chrome"' - 'fieldtrial_testing_like_official_build=true' - 'gold_path="/usr/bin/ld.gold"' - 'icu_use_data_file=true' - "is_clang=$(vopt_if clang true false)" - 'is_component_build=false' - "is_debug=$_is_debug" - 'is_desktop_linux=true' - 'linux_use_bundled_binutils=false' - 'proprietary_codecs=true' - 'symbol_level=0' - 'treat_warnings_as_errors=false' - 'use_allocator_shim=false' - 'use_allocator="none"' - 'use_cups=true' - 'use_custom_libcxx=false' - 'use_gnome_keyring=false' - 'use_gold=false' - 'use_lld=false' - "use_pulseaudio=$(vopt_if pulseaudio 'true' 'false')" - 'use_sysroot=false' - 'use_system_harfbuzz=true' - "target_cpu=\"$target_arch\"" - "host_cpu=\"$host_arch\"" - 'import("//electron/build/args/release.gn")' - ) - - msg_normal "Bootstrapping GN\n" - CC="${CC_FOR_BUILD:-$CC}" CXX="${CXX_FOR_BUILD:-$CXX}" LD="${LD_FOR_BUILD:-$LD}" \ - CFLAGS="${CFLAGS_FOR_BUILD:-$CFLAGS}" CXXFLAGS="${CXXFLAGS_FOR_BUILD:-$CXXFLAGS}" \ - LDFLAGS="${XBPS_LDFLAGS}" \ - python2 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles - - msg_normal "Configuring build\n" - out/Release/gn gen out/$_buildtype --args="${conf[*]}" -} - -do_build() { - export CXXFLAGS=$( shopt -s extglob; echo ${CXXFLAGS/-march=*([^ ])} ) - export CFLAGS=$( shopt -s extglob; echo ${CFLAGS/-march=*([^ ])} ) - if [ "$build_option_clang" ]; then - export CC=clang - export CXX=clang++ - export HOST_CC=clang - export HOST_CXX=clang++ - else - export BUILD_CXXFLAGS="$BUILD_CXXFLAGS -fpermissive" - export CXXFLAGS="$CXXFLAGS -fpermissive" - export BUILD_AR="$AR_host" - export BUILD_NM="$NM_host" - fi - msg_normal "Ninja turtles GO!\n" - ninja ${makejobs} -C out/$_buildtype electron third_party/electron_node:headers - # finish rest of the build - strip -s out/$_buildtype/electron - ninja ${makejobs} -C out/$_buildtype electron_dist_zip -} - -do_install() { - vmkdir /usr/lib/$pkgname - vmkdir /usr/include/$pkgname - bsdtar -xf out/$_buildtype/dist.zip -C "$DESTDIR/usr/lib/$pkgname" - - chmod u+s "$DESTDIR/usr/lib/$pkgname/chrome-sandbox" - - cp out/$_buildtype/gen/node_headers.tar.gz "$DESTDIR"/usr/include/$pkgname - - vlicense ${wrksrc}/src/LICENSE chromium.LICENSE - vlicense ${wrksrc}/src/electron/LICENSE electron.LICENSE - vlicense ${wrksrc}/src/third_party/electron_node/LICENSE node.LICENSE - - vmkdir /usr/bin - ln -s ../lib/$pkgname/electron "$DESTDIR"/usr/bin/$pkgname -} diff --git a/srcpkgs/electron7/update b/srcpkgs/electron7/update deleted file mode 100644 index 3af8e58b535..00000000000 --- a/srcpkgs/electron7/update +++ /dev/null @@ -1,2 +0,0 @@ -site=https://www.electronjs.org/releases/stable?version=${version%%.*} -pattern='tag/v\K[\d\.]+(?=")'