- Code: Select all
// Increment/decrement reference counts on only the underlying class.
void UnderlyingAddRef() const {
cef_base_ref_counted_t* base =
reinterpret_cast<cef_base_ref_counted_t*>(GetStruct());
if (base->add_ref)
base->add_ref(base);
}
Chromium provides this configuration to work around the error in build/config/sanitizers/BUILD.gn:
- Code: Select all
# crbug.com/785442: Fix cfi-icall failures for code that casts pointer argument
# types in function pointer type signatures.
config("cfi_icall_generalize_pointers") {
if (is_clang && is_cfi && use_cfi_icall) {
cflags = [ "-fsanitize-cfi-icall-generalize-pointers" ]
}
}