From 40c48efc97e1692154f38e01ef1739bbef1e4728 Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Fri, 23 Oct 2020 04:29:32 +0000 Subject: www/chromium: Update to version 85.0.4183.121 Submitted by: cem, rene Obtained from: some patches from OpenBSD port --- .../files/patch-mojo_public_c_system_thunks.cc | 45 ++++++++++------------ 1 file changed, 21 insertions(+), 24 deletions(-) (limited to 'www/chromium/files/patch-mojo_public_c_system_thunks.cc') diff --git a/www/chromium/files/patch-mojo_public_c_system_thunks.cc b/www/chromium/files/patch-mojo_public_c_system_thunks.cc index dec03d588689..e1adc8b60375 100644 --- a/www/chromium/files/patch-mojo_public_c_system_thunks.cc +++ b/www/chromium/files/patch-mojo_public_c_system_thunks.cc @@ -1,49 +1,46 @@ ---- mojo/public/c/system/thunks.cc.orig 2020-02-03 21:52:48 UTC +--- mojo/public/c/system/thunks.cc.orig 2020-09-08 19:14:08 UTC +++ mojo/public/c/system/thunks.cc -@@ -15,7 +15,7 @@ - #include "build/build_config.h" +@@ -20,7 +20,7 @@ #include "mojo/public/c/system/core.h" + #include "mojo/public/c/system/macros.h" -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) #include "base/environment.h" #include "base/files/file_path.h" #include "base/optional.h" -@@ -58,7 +58,7 @@ namespace mojo { - class CoreLibraryInitializer { - public: - CoreLibraryInitializer(const MojoInitializeOptions* options) { +@@ -68,7 +68,7 @@ class CoreLibraryInitializer { + ~CoreLibraryInitializer() = default; + + MojoResult LoadLibrary(base::FilePath library_path) { -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) - bool application_provided_path = false; - base::Optional library_path; - if (options && options->struct_size >= sizeof(*options) && -@@ -77,7 +77,7 @@ class CoreLibraryInitializer { + if (library_ && library_->is_valid()) + return MOJO_RESULT_OK; + +@@ -82,7 +82,7 @@ class CoreLibraryInitializer { - if (!library_path) { + if (library_path.empty()) { // Default to looking for the library in the current working directory. -#if defined(OS_CHROMEOS) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) const base::FilePath::CharType kDefaultLibraryPathValue[] = FILE_PATH_LITERAL("./libmojo_core.so"); #elif defined(OS_WIN) -@@ -127,16 +127,16 @@ class CoreLibraryInitializer { +@@ -126,13 +126,13 @@ class CoreLibraryInitializer { - CHECK_GT(g_thunks.size, 0u) - << "Invalid mojo_core library: " << library_path->value(); --#else // defined(OS_CHROMEOS) || defined(OS_LINUX) -+#else // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) - NOTREACHED() - << "Dynamic mojo_core loading is not supported on this platform."; --#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) -+#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD) + library_ = std::move(library); + return MOJO_RESULT_OK; +-#else // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#else // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) + return MOJO_RESULT_UNIMPLEMENTED; +-#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) ++#endif // defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) } - ~CoreLibraryInitializer() = default; - private: -#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD) base::Optional library_; #endif - + }; -- cgit v1.2.3