2019-10-01 13:30:07 +02:00
|
|
|
diff --git base/BUILD.gn base/BUILD.gn
|
2022-04-21 20:58:48 +02:00
|
|
|
index 15da9351b899b..a027749fce2ef 100644
|
2019-10-01 13:30:07 +02:00
|
|
|
--- base/BUILD.gn
|
|
|
|
+++ base/BUILD.gn
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -37,6 +37,7 @@ import("//build/nocompile.gni")
|
2022-01-25 21:26:51 +01:00
|
|
|
import("//build/rust/mixed_component.gni")
|
2019-10-01 13:30:07 +02:00
|
|
|
import("//build/timestamp.gni")
|
2020-07-08 19:23:29 +02:00
|
|
|
import("//build_overrides/build.gni")
|
2019-10-01 13:30:07 +02:00
|
|
|
+import("//cef/libcef/features/features.gni")
|
|
|
|
import("//testing/libfuzzer/fuzzer_test.gni")
|
|
|
|
import("//testing/test.gni")
|
2022-04-21 20:58:48 +02:00
|
|
|
|
|
|
|
@@ -1886,7 +1887,11 @@ mixed_component("base") {
|
2019-10-01 13:30:07 +02:00
|
|
|
"hash/md5_constexpr_internal.h",
|
|
|
|
"hash/sha1.h",
|
|
|
|
]
|
|
|
|
- if (is_nacl) {
|
|
|
|
+ deps += [ "//cef/libcef/features" ]
|
|
|
|
+ if (enable_cef) {
|
|
|
|
+ configs += [ "//cef/libcef/features:config" ]
|
|
|
|
+ }
|
|
|
|
+ if (is_nacl || is_cef_sandbox_build) {
|
|
|
|
sources += [
|
|
|
|
"hash/md5_nacl.cc",
|
|
|
|
"hash/md5_nacl.h",
|
2022-04-21 20:58:48 +02:00
|
|
|
@@ -2030,6 +2035,12 @@ mixed_component("base") {
|
2020-10-08 21:54:42 +02:00
|
|
|
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
+ if (!use_custom_libcxx) {
|
|
|
|
+ # Enable the VS 2015 Update 2 fix when building with the MSVC standard
|
|
|
|
+ # library.
|
|
|
|
+ defines += [ "_ENABLE_ATOMIC_ALIGNMENT_FIX" ]
|
|
|
|
+ }
|
|
|
|
+
|
2021-08-20 01:40:49 +02:00
|
|
|
libs += [
|
|
|
|
"cfgmgr32.lib",
|
|
|
|
"powrprof.lib",
|
2019-10-01 13:30:07 +02:00
|
|
|
diff --git base/hash/md5.h base/hash/md5.h
|
2022-01-25 21:26:51 +01:00
|
|
|
index ea6bbd31e3fc8..9941050ac0113 100644
|
2019-10-01 13:30:07 +02:00
|
|
|
--- base/hash/md5.h
|
|
|
|
+++ base/hash/md5.h
|
|
|
|
@@ -10,8 +10,9 @@
|
|
|
|
#include "base/base_export.h"
|
|
|
|
#include "base/strings/string_piece.h"
|
|
|
|
#include "build/build_config.h"
|
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
|
2022-01-25 21:26:51 +01:00
|
|
|
-#if BUILDFLAG(IS_NACL)
|
|
|
|
+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
2019-10-01 13:30:07 +02:00
|
|
|
#include "base/hash/md5_nacl.h"
|
|
|
|
#else
|
|
|
|
#include "base/hash/md5_boringssl.h"
|
2021-04-21 00:52:34 +02:00
|
|
|
diff --git base/hash/sha1.h base/hash/sha1.h
|
2022-01-25 21:26:51 +01:00
|
|
|
index c4e656b9a68ef..8eb01343cd5d1 100644
|
2021-04-21 00:52:34 +02:00
|
|
|
--- base/hash/sha1.h
|
|
|
|
+++ base/hash/sha1.h
|
|
|
|
@@ -14,7 +14,9 @@
|
|
|
|
#include "base/containers/span.h"
|
|
|
|
#include "base/strings/string_piece.h"
|
|
|
|
#include "build/build_config.h"
|
2022-01-25 21:26:51 +01:00
|
|
|
-#if BUILDFLAG(IS_NACL)
|
2021-04-21 00:52:34 +02:00
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
+
|
2022-01-25 21:26:51 +01:00
|
|
|
+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
2021-04-21 00:52:34 +02:00
|
|
|
#include "base/hash/sha1_nacl.h"
|
|
|
|
#else
|
|
|
|
#include "base/hash/sha1_boringssl.h"
|
2021-08-20 01:40:49 +02:00
|
|
|
diff --git base/unguessable_token.cc base/unguessable_token.cc
|
2022-01-25 21:26:51 +01:00
|
|
|
index 04ea514c6ce35..4f69b8a7f87f3 100644
|
2021-08-20 01:40:49 +02:00
|
|
|
--- base/unguessable_token.cc
|
|
|
|
+++ base/unguessable_token.cc
|
|
|
|
@@ -9,8 +9,9 @@
|
|
|
|
#include "base/format_macros.h"
|
|
|
|
#include "base/rand_util.h"
|
|
|
|
#include "build/build_config.h"
|
|
|
|
+#include "cef/libcef/features/features.h"
|
|
|
|
|
2022-01-25 21:26:51 +01:00
|
|
|
-#if !BUILDFLAG(IS_NACL)
|
|
|
|
+#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
2021-08-20 01:40:49 +02:00
|
|
|
#include "third_party/boringssl/src/include/openssl/mem.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
@@ -41,7 +42,7 @@ UnguessableToken UnguessableToken::Deserialize(uint64_t high, uint64_t low) {
|
|
|
|
}
|
|
|
|
|
|
|
|
bool UnguessableToken::operator==(const UnguessableToken& other) const {
|
2022-01-25 21:26:51 +01:00
|
|
|
-#if BUILDFLAG(IS_NACL)
|
|
|
|
+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
|
2021-08-20 01:40:49 +02:00
|
|
|
// BoringSSL is unavailable for NaCl builds so it remains timing dependent.
|
|
|
|
return token_ == other.token_;
|
|
|
|
#else
|