Shipping both snapshot_blob.bin and v8_context_snapshot.bin is
unnecessary, and v8_context_snapshot.bin is available on all
supported platforms. Chrome stopped shipping snapshot_blob.bin
in https://crrev.com/b550792f0f (~M66).
- Generated files are now created when running cef_create_projects or
the new version_manager.py tool. These files are still created in the
cef/ source tree (same location as before) but Git ignores them due to
the generated .gitignore file.
- API hashes are committed to Git as a new cef_api_versions.json file.
This file is used for both code generation and CEF version calculation
(replacing the previous usage of cef_api_hash.h for this purpose).
It will be updated by the CEF admin before merging breaking API
changes upstream.
- As an added benefit to the above, contributor PRs will no longer
contain generated code that is susceptible to frequent merge conflicts.
- From a code generation perspective, the main difference is that we now
use versioned structs (e.g. cef_browser_0_t instead of cef_browser_t)
on the libcef (dll/framework) side. Most of the make_*.py tool changes
are related to supporting this.
- From the client perspective, you can now define CEF_API_VERSION in the
project configuration (or get CEF_EXPERIMENTAL by default). This
define will change the API exposed in CEF’s include/ and include/capi
header files. All client-side targets including libcef_dll_wrapper
will need be recompiled when changing this define.
- Examples of the new API-related define usage are provided in
cef_api_version_test.h, api_version_test_impl.cc and
api_version_unittest.cc.
To test:
- Run `ceftests --gtest_filter=ApiVersionTest.*`
- Add `cef_api_version=13300` to GN_DEFINES. Re-run configure, build and
ceftests steps.
- Repeat with 13301, 13302, 13303 (all supported test versions).
Using cc_import + interface_library/shared_library to link libcef.lib causes
libcef.dll to be copied as a transitive dependency, leading to issues with
complex Bazel configs. Instead, we explicitly link libcef.lib in the binary
target (cc_binary + linkopts/additional_linker_inputs) and explicitly copy
libcef.dll to the target directory.
- Add `declare_[cc|objc]_library` macros to configure common `copts`
and `local_defines` (where supported) on `[cc|objc]_library`
targets. This limits the scope of defines to the specific target
without inheritance by dependent targets.
- `objc_library` does not currently support `local_defines` so we
use `copts` instead of MacOS.
- Use `**kwargs` to pass all other arguments to the actual cc
target declaration.
When the V8 sandbox is enabled, ArrayBuffer backing stores must be
allocated inside the sandbox address space. This change introduces a new
CefV8Value::CreateArrayBufferWithCopy method that copies the memory
contents into the sandbox address space.
Enabling the V8 sandbox can have a performance impact, especially when
passing large ArrayBuffers from C++ code to the JS side. We have therefore
retained the old CefV8Value::CreateArrayBuffer method that references
external memory. However, this method can only be used if the V8 sandbox is
disabled at CEF/Chromium build time.
To disable the V8 sandbox add `v8_enable_sandbox=false` to
`GN_DEFINES` when building CEF/Chromium.
- Headers that are included by .rc files need to be supplied to
`declare_exe` via the `resources_deps` attribute (passed as the `deps
attribute to `compile_rc`). The headers must be part of a cc_library
target via either the `hdrs` or `srcs` attribute.
- File paths for CEF resources are prefixed with "external/<repo>"
when CEF is loaded as an external repo. Update `copy_filegroups` to
work with these paths.
Unqualified target labels don't resolve correctly when the
disribution is loaded as an external repo. Mapping, if necessary,
can be performed using the `repo_mapping` parameter to
http_archive() or local_repository().
Add support for building the CEF binary distribution using Bazel
and the default platform toolchain. Tested to work for Windows
x64, MacOS ARM64 and x64 (cross-compile from ARM64), and
Linux x64. Windows x86 (cross-compile from x64) is known to
be broken, see https://github.com/bazelbuild/bazel/issues/22164.
Includes minor changes to tests directory structure to meet
Bazel build requirements.
Compatible configurations include:
- Non-component builds.
- Debug builds on Mac/Linux.
- Release builds on Windows (b/c Debug builds require component builds).
- ASAN builds (which are also Release builds).
See related logic in //build_overrides/partition_alloc.gni
Now that args.gn is an input to the make_config_header target we
don't want to invalidate the build unnecessarily by modifying the
file if the contents are unchanged.
Include cef_config.h from base/cef_build.h and fix detection of
args.gn changes so that defines are available everywhere by default.
Fix include configuration for chrome_elf_set and sandbox targets.
Adds support for the OnAcceleratedPaint callback. Verified to work
on macOS and Windows. Linux support is present but not implemented
for cefclient, so it is not verified to work.
To test:
Run `cefclient --off-screen-rendering-enabled --shared-texture-enabled`
Starting with Python 3.12, use of invalid escape sequences in strings
is reported as a SyntaxWarning and will become a SyntaxError at a
later point.
Regular expressions use the backslash character a lot, which result in
warnings of this kind. Python docs recommend to generally use raw
strings for this purpose.
Adds a new GN_OUT_CONFIGS environment variable that, if specified,
will limit the generated configurations to a list of comma-delimited
values (e.g. "Debug_GN_x64,Release_GN_x64").
- chrome: Disable upgrade/downgrade behavior (see #3608)
- chrome: Disable process singleton behavior (see #3609)
- chrome: Disable config as default system browser (see #3613)