Skip to content

Commit 9e296bd

Browse files
camarie-bdmagreenblatt
authored andcommitted
Windows: Fix duplicate symbol ThrowBadVariantAccess with cef_sandbox build (fixes issue chromiumembedded#3021)
1 parent 015e362 commit 9e296bd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ if (is_win) {
12561256
sources = [ "libcef_dll/sandbox/sandbox_win.cc" ]
12571257
# CEF sources use include paths relative to the CEF root directory.
12581258
include_dirs = [ "." ]
1259-
deps = [ "//sandbox" ]
1259+
deps = [ "libcef/features", "//sandbox" ]
12601260
}
12611261
}
12621262

libcef_dll/sandbox/sandbox_win.cc

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "sandbox/win/src/process_mitigations.h"
77
#include "sandbox/win/src/sandbox_factory.h"
88

9+
#include "cef/libcef/features/features.h"
910
#include "include/cef_sandbox_win.h"
1011

1112
namespace {
@@ -39,6 +40,7 @@ void cef_sandbox_info_destroy(void* sandbox_info) {
3940
delete static_cast<sandbox::SandboxInterfaceInfo*>(sandbox_info);
4041
}
4142

43+
#if BUILDFLAG(IS_CEF_SANDBOX_BUILD)
4244
// Implementation from third_party/abseil-cpp/absl/types/bad_variant_access.cc
4345
// to avoid bringing in absl dependencies.
4446
namespace absl {
@@ -48,3 +50,4 @@ void ThrowBadVariantAccess() {
4850
}
4951
} // namespace variant_internal
5052
} // namespace absl
53+
#endif // BUILDFLAG(IS_CEF_SANDBOX_BUILD)

0 commit comments

Comments
 (0)