Commit Graph
3572 Commits
Author SHA1 Message Date
Marshall Greenblatt d299f9ad12 mac: Add libvulkan.dylib to framework/Libraries (fixes #4230) 2026-07-30 16:05:03 -04:00
Marshall Greenblatt 29a8e5f6dd installer: preserve healthy fallbacks during background updates (see #4093)
Replace cefclient's separate launch-health and update timers with a single
health-first task. Start the update only after launch_success returns structured
success so the running version becomes a confirmed fallback before a newer
version is installed.

Keep older confirmed launch records until the selected version's health is
durably confirmed. A normal exit remains neutral in explicit mode, while
exit-code and health-off modes retain their clean-exit pruning behavior.

Reconcile valid indexes under the installer lock by quarantining canonical
version directories absent from the index. Defer loaded-DLL cleanup through
.trash for later writers, and avoid emergency-recovery warnings for an empty
fresh store while preserving warnings for meaningful recovery attempts.

Expand unit and Windows E2E coverage for update ordering, confirmation and
persistence failures, fallback retention, pruning modes, loaded-version
quarantine, lock contention, and recovery. Update the installer documentation
to describe the combined behavior.

New behavior confirmed with cefclient:

1. Launch cefclient. After 60 seconds, 'launch_success' confirms the old
   version and 'update' installs the new version.
2. Exit and relaunch cefclient. Second run uses the new version. After 60
   seconds, 'launch_success' confirms the new version. Upon clean exit the
   old version loses fallback protection and is pruned.
2026-07-29 17:46:31 -04:00
Marshall Greenblatt 25807ea643 build: Pin depot_tools checkout to match deps version
The master depot_tools version has gclient.py changes that are
incompatible with tarball_gclient.patch.
2026-07-28 12:51:07 -04:00
Marshall Greenblatt 94d6118b7d docs: Fix installer.md source links for page rendering (see #4093) 2026-07-27 17:02:07 -04:00
Marshall Greenblatt fa3d4f0dbe docs: Add installer.md overview (see #4093) 2026-07-27 14:06:00 -04:00
Marshall Greenblatt 97c56bd5cd cefclient: cmake: Add -DUSE_INSTALLER=On option (see #4093)
Creates a Release-only Windows build configuration of cefclient with
installer integration enabled.
2026-07-27 14:06:00 -04:00
Marshall Greenblatt 1845c1e9f9 tools: Fix YAPF cache writes on Windows
Avoid tempfile.NamedTemporaryFile's effectively unbounded Windows retry.
Restricted sandboxes can deny YAPF grammar-cache writes. Write each cache
to a unique file, close it, and atomically replace it. Clean up failures
to prevent orphaned pickle files.

Upstream issue: https://github.com/google/yapf/issues/1311
2026-07-27 14:06:00 -04:00
Marshall Greenblatt 65e50f1c0b ai: Add testing guidance for tools/ 2026-07-27 14:06:00 -04:00
Marshall Greenblatt d43e90df57 tools: Restore translator notification context
Clear the parser notification context in a finally block for both CppToC
and CToCpp implementation writers, including when generation raises.

Update failure-path regressions to require context restoration while
preserving successful output behavior.
2026-07-27 14:06:00 -04:00
Marshall Greenblatt 8d83469d79 tools: Fix Python 3 CMake variable merging
Merge generated and manually maintained GYPI variables with copy and update
so the CLI works on Python 3 while preserving manual override precedence.

Add a hermetic CLI regression for exact output, progress diagnostics, and
unchanged repeated generation.
2026-07-27 14:06:00 -04:00
Marshall Greenblatt 3abf1e19b0 tools: Fix implementation generator CLI output
Unpack the CppToC and CToCpp generator results before writing generated
content to stdout. This preserves the existing generator return contracts.

Add successful CLI regressions that verify exact output, empty stderr, and
unchanged input files.
2026-07-27 14:05:59 -04:00
Marshall Greenblatt 66a6bb115d tools: Return failure for invalid distributions
Return a nonzero status when distribution option validation fails so callers
do not interpret rejected invocations as successful.

Replace the existing characterization with regressions that verify the status,
diagnostics, and absence of partial output artifacts.
2026-07-27 14:05:59 -04:00
Marshall Greenblatt 12e5a74d01 tools: Report pack include-only updates
Return the combined header and include write result from make_pack_header.
This ensures callers observe repairs that modify only the generated include.

Replace the existing bug characterization with a regression test for the
correct return contract. Generated file contents remain unchanged.
2026-07-27 14:05:59 -04:00
Marshall Greenblatt 75745dce64 tools: Add make generator test coverage
Add deterministic fixtures, goldens, and matching tests for all 18
make_* generators. Refactor make_distrib orchestration behind an
importable main entry point while preserving generated output. Add
passing characterizations for existing generator issues.
2026-07-27 14:05:59 -04:00
Marshall Greenblatt 3eeee9d063 Tag 15101 API version 2026-07-27 14:05:59 -04:00
Marshall Greenblatt 5b35bb581b claude: Add code coverage instructions and analysis
Add tools for analyzing code coverage of CEF installer tests:
- analyze_coverage_output.py: Parse llvm-cov JSON summaries, filter by
  path, and report uncovered functions and line ranges.
- CLAUDE_COVERAGE_INSTRUCTIONS.md: One-time setup and usage guide for
  generating coverage reports with llvm-profdata/llvm-cov.
- Unit tests for the analysis script.
2026-07-27 14:05:59 -04:00
Marshall Greenblatt cd81c6315a tests: Use CEF_API_VERSION_LAST for client DLL targets (see #4093)
When building a client DLL loaded by bootstrap.exe, default to the last
released API version instead of the experimental (unversioned) API. The
experimental API is not back/forward compatible across CEF versions and
does not bump the version number, so the installer's vmin-based version
selection cannot work safely against it. Building with
CEF_API_VERSION=CEF_API_VERSION_LAST makes the client forward-compatible
with newer libcef.dll binaries (via API backwards compatibility).
2026-07-27 14:05:59 -04:00
Marshall Greenblatt be20927a8d installer: Add bootstrap installer for Windows (see #4093)
Add a shared CEF installer that downloads, verifies, and manages CEF
binary distributions on Windows. The installer is embedded in
application bootstrap binaries and resolves the correct CEF version
from a CDN manifest based on each application's version and ABI
compatibility requirements.

Key components:
- CDN manifest parsing and version resolution
- WinHTTP-based download with SHA-1/SHA-256 integrity verification
- Authenticode catalog (.cat) signature verification
- Parallel XZ decompression for fast archive extraction
- Per-version metadata (cef_version.json) with full version tracking
- Shared installation database for multi-app version management
- Version pruning to reclaim disk space from unused versions
- Revocation list support (compiled-in baseline + CDN delta)
- Progress UI with WM_COPYDATA-based cancellation
- Bundled CEF fallback for offline/CDN-failure scenarios
2026-07-27 14:04:48 -04:00
Marshall Greenblatt 7324f016a3 cefbuilds: Add installer CDN query file generation (see #4093)
Add cef_installer_builder.py to generate per-milestone and per-platform
JSON manifests consumed by the CEF bootstrap installer. Extend
cef_json_builder.py with abi_hash, signed archive tracking, and
revocation list (revoked.json) support. Includes unit tests.
2026-07-19 14:58:46 -04:00
Marshall Greenblatt 803fe341df ai: Add tmp/ to .gitignore 2026-07-19 14:58:46 -04:00
Marshall Greenblatt 25c624e50b Fix validation of newer CEF structures
Allow size-prefixed structures passed by newer libcef versions to exceed
the client wrapper's local structure size. The wrapper already limits
copies to known fields, so rejecting larger structures breaks API forward
compatibility.

Add coverage using an older wrapper view of a newer structure.
2026-07-19 14:58:46 -04:00
Marshall Greenblatt df6c7a115f ceftests: Skip GBK download tests without a UTF-8 locale (see #4184) 2026-07-19 14:58:46 -04:00
Marshall Greenblatt b41c5c64fc Tag 15100 API version 2026-07-10 16:23:27 -04:00
Marshall Greenblatt 7672074da3 Fix added metadata for SendHttpResponseWithRawHeaders API (see #3135) 2026-07-10 16:22:25 -04:00
Marshall Greenblatt db9edaddfe Revert "Tag 15100 API version"
This reverts commit 6b45d8c388.
2026-07-10 16:21:34 -04:00
Marshall Greenblatt 20fa2f2353 docs: Add Beta 7922 branch 2026-07-10 11:55:14 -04:00
Marshall Greenblatt 8eb9634fa1 Don't depend on histograms.xml when not in a git checkout
Cherry-pick of https://crrev.com/27f8690db9
2026-07-09 15:02:35 -04:00
Marshall Greenblatt 6b45d8c388 Tag 15100 API version 2026-07-09 14:17:20 -04:00
Marshall Greenblatt 351965a7cb Change to CEF_NEXT for SendHttpResponseWithRawHeaders API (see #3135) 2026-07-09 14:10:22 -04:00
Marshall Greenblatt e8e83e2b92 linux: Fix Wayland crash at startup with multi-threaded message loop
Disable creation of GtkUi on Wayland when using multi-threaded-message-loop,
matching the existing X11 behavior (see #3610). GtkUi connects GDK signals
(e.g. GdkMonitor notify::scale-factor) on the CEF UI thread, but GDK sources
run on the default GMainContext owned by the application's main thread, so
signal emission fails a ScopedGSignal sequence checker DCHECK.
2026-07-09 12:26:23 -04:00
Marshall Greenblatt dc81432928 alloy: Fix crash on default permission prompt handling
With Alloy style there is no Chrome Browser object, so falling through
to the Chrome permission prompt factory crashes when anchoring the
Views bubble (null BrowserWindowInterface dereference in
BrowserView::GetBrowserViewForBrowser). Older Chromium bailed out of
CreatePermissionPrompt when the WebContents had no attached Browser,
which provided the implicit IGNORE behavior for Alloy style; that
bail-out was removed in the 7922 rebase.

Make the IGNORE behavior explicit by returning with
default_handling=false for Alloy style when the client does not handle
the prompt in OnShowPermissionPrompt. Chrome style behavior is
unchanged.
2026-07-08 16:36:48 -04:00
Marshall Greenblatt 30839cad1d win: Fix CHECK failure on shutdown with multi-threaded message loop
With an external parent window owned by a different thread the OS may
deliver WM_DESTROY multiple times for the same HWND during
DestroyWindow. Guard DesktopWindowTreeHostWin::HandleDestroying so that
Widget::OnNativeWidgetDestroying is only called once, matching the
equivalent upstream guard added for Mac. Otherwise the new
CHECK(!widget_destroying_handled_) in Widget::HandleWidgetDestroying
(https://crrev.com/41b2d8f9dd821) fails when closing a browser window
with `--use-native --multi-threaded-message-loop`.
2026-07-08 16:05:23 -04:00
Marshall Greenblatt f31f51eb73 Update to Chromium version 151.0.7922.0 (#1654411) 2026-07-08 12:10:52 -04:00
Marshall Greenblatt 39758987b5 chrome: Fix dangling pointers during child window teardown (fixes #4147)
Fixes two teardown-ordering hazards for Chrome style browsers created with
a native parent window (CefWindowInfo::SetAsChild):

- ChromeBrowserHostImpl::DestroyBrowser() may destroy the platform delegate
  before Widget teardown destroys the ChildWindowDelegate, leaving its
  raw_ptr dangling (SIGTRAP with PartitionAllocDanglingPtr). The pointer
  was only cleared in OnWindowDestroyed on Windows, and only if that ran
  first. Store a base::WeakPtr from the existing
  CefBrowserPlatformDelegateNativeAura factory instead, which
  auto-invalidates on delegate destruction on all Aura platforms.

- In the reverse order on Windows, the client may destroy the parent window
  (and thereby the browser's Widget) while the browser is still alive,
  leaving the Widget pointer cached by set_widget() dangling. SetFocus,
  NotifyMoveOrResizeStarted and root window bounds queries could then
  dereference the deleted Widget. Reuse the existing WidgetDeleted
  mechanism (already wired up for the non-Views-hosted code path in
  CreateHostWindow) by executing the delete callback from
  ChildWindowDelegate::OnWindowDestroyed. The callback is bound with a
  WeakPtr, so it no-ops safely when the delegate is destroyed first.

Adds ceftests coverage for both teardown orders (Windows and Linux X11).
Dangling pointer regressions are detected when running with
--enable-features=PartitionAllocBackupRefPtr,PartitionAllocDanglingPtr or
in an ASAN build. Chrome style is not supported with a native parent on
MacOS (see issue #3294).
2026-07-06 17:44:01 -04:00
linesight 3e31138073 Use Content-Type charset when decoding download filenames (#4184, fixes #3135)
Prefer the charset declared in the Content-Type response header, falling
back to the intl.charset_default preference. Adds the experimental
CefTestServerConnection::SendHttpResponseWithRawHeaders API so tests can
send raw non-UTF-8 header bytes, with coverage for both charset sources
and the new API.
2026-07-06 16:53:02 -04:00
迷渡 a06908834f Fix pending provider removal iteration (#4206, fixes #4173)
Advance the provider iterator when DeleteProvider encounters an entry
that is already pending deletion.
Add ResourceManagerTest.ProviderRemoveThenRemoveAll to cover
RemoveProviders followed by RemoveAllProviders before queued cleanup
runs.
2026-07-06 16:26:21 -04:00
Marshall Greenblatt 6d13a3ed54 Strip Sec-CH-* headers on trustworthiness downgrade redirect (fixes #4207)
Fixes a Client Hints metadata leak on HTTP redirects of
renderer-initiated subresource requests.

On redirect, CEF restarts the request through the URLLoaderFactory
(InterceptedRequest::FollowRedirect -> Restart ->
ContinueToBeforeRedirect) instead of following it on the existing
loader. Stock Chromium's in-place path calls
network::MaybeRemoveSecHeaders in URLLoader::FollowRedirect, which
strips sec-ch-* (and sec-fetch-*) prefixed headers when the redirect
goes from a potentially trustworthy URL to an untrustworthy one, so
that Client Hints attached on the prior hop are not disclosed to a
destination that would never have received them directly. CEF's
restart path skipped that step and re-submitted the carried-over
Sec-CH-* headers.

The fix strips the Sec-CH- header family by prefix before the restart,
conditional on the same trustworthiness downgrade check
(network::IsUrlPotentiallyTrustworthy). Unlike Sec-Fetch-* (see #4190),
Sec-CH-* headers are not re-derived downstream, so they must be
preserved on all other redirects.

Two redirect shapes bypass CEF's restart path entirely and behave
identically in stock Chromium (out of scope here): redirects out of the
network service's URL space (e.g. to a custom scheme), which the
renderer re-issues itself via
ThrottlingURLLoader::FollowRedirectForcingRestart with blink-level
headers; and mode "cors" requests whose CORS flag flips on redirect,
which CorsURLLoader::StartRequest re-issues from its own header copy.

Adds CorsTest.ScriptRedirectSubresourceSecHeaders* regression tests
covering the same-trust, cross-origin-trustworthy and downgrade cases,
asserting Sec-CH-*/Sec-Fetch-* presence on both the redirecting hop and
the target.
2026-07-06 16:15:56 -04:00
Tom Crowley 88d89aeef5 Strip Sec-Fetch-* headers on redirect (#4190, fixes #4189, fixes #4198)
Fixes a network-service / renderer process kill on HTTP redirects of
renderer-initiated subresource requests.

On redirect, CEF restarts the request through the URLLoaderFactory
(InterceptedRequest::FollowRedirect -> Restart ->
ContinueToBeforeRedirect) instead of following it on the existing
loader. The restart re-submits the network-service-managed Sec-Fetch-*
headers that were populated on the prior hop. With
kRestrictForbiddenSecurityHeaders now enabled by default in Chromium,
CorsURLLoaderFactory::IsValidRequest ->
ContainsForbiddenSecurityHeader rejects those renderer-forbidden headers
via mojo::ReportBadMessage, tearing down the network service.

Only renderer-initiated subresources (fetch/XHR/img/script) trigger
this; browser-initiated top-level navigations skip the check, which is
why a top-level redirect doesn't reproduce it.

The fix strips the Sec-Fetch- header family by prefix (mirroring
Chromium's own network::MaybeRemoveSecHeaders) from remove_headers
before the restart, so new members like Sec-Fetch-Frame-Top /
Sec-Fetch-Frame-Ancestors are covered without maintaining an explicit
list. URLLoader re-derives them downstream (SetFetchMetadataHeaders), so
this is lossless and mirrors CorsURLLoader's normal redirect path.

Adds CorsTest.XhrRedirectSubresource and
CorsTest.FetchRedirectSubresource regression tests.
2026-07-06 15:16:07 -04:00
SuchetaSaraf b2d312cd48 cefsimple_capi: Add missing cef_app_win.h include
Fixes x86 build error.
2026-06-24 10:04:55 -04:00
Marshall Greenblatt 0ab4c3f73e docs: Add Beta 7871 branch 2026-06-15 18:41:27 -04:00
Marshall Greenblatt 74d031e4b7 Tag 15000 API version 2026-06-04 11:40:18 -04:00
Marshall Greenblatt 3bd7770cc7 linux: Set use_unified_system_module=false with use_sysroot=false
Unified system modules require a sysroot path. Disable when not using
a sysroot to avoid empty path errors in //build/modules/BUILD.gn.
Enabled on Linux by default after https://crrev.com/1da08484a2c35
2026-06-03 20:14:55 -04:00
Marshall Greenblatt 9e301ca4ff win: Disable precompiled headers for non-Official builds
After https://crrev.com/d5706ff4b1f47 the cxx tool in
//build/toolchain/win/toolchain.gni now unconditionally passes
-fmodule-name to every C++ compilation. On Windows, precompiled
headers work by compiling build/precompile.cc with the /Yc flag.
The combination of -fmodule-name + /Yc in C++23 mode causes LLVM
23's clang-cl to treat precompile.cc as a C++20 module interface
unit, which then fails because the file has no export module
declaration.

This is a no-op for Mac, Linux and Official Windows builds where
precompiled headers are already effectively disabled by default.
2026-06-03 13:41:43 -04:00
Marshall Greenblatt adfd49d418 claude: Improve deprecation instructions 2026-06-02 16:51:27 -04:00
Marshall Greenblatt 0727f286a7 Update to Chromium version 150.0.7871.0 (#1639810) 2026-06-02 16:46:54 -04:00
Marshall Greenblatt 7ec663b3a0 guthub: Add issue template config with contributing and forum links
Surface contributing guidelines and forum link on the issue template
chooser page so they are visible before someone starts writing an issue.
2026-06-01 14:25:53 -04:00
Marshall Greenblatt 61881c7c79 docs: Add AI_POLICY.md and CONTRIBUTING.md
Extract contribution guidelines from README.md into a standalone
CONTRIBUTING.md so GitHub surfaces them when opening PRs and issues.
Add AI_POLICY.md declaring permissive-but-accountable rules for AI tool
usage in contributions. Trim the README "Helping Out" section to a short
summary pointing to CONTRIBUTING.md.
2026-06-01 14:18:45 -04:00
Marshall Greenblatt ffa86e361d docs: Add Beta 7827 branch 2026-05-22 18:49:58 -04:00
Marshall Greenblatt 4c3243e89a Tag 14900 API version 2026-05-22 16:44:34 -04:00
Marshall Greenblatt 096e9e5d7e Lazy-seed InsecureRandomGenerator to fix network process crash
In CEF dcheck_always_on=true builds on Windows, the network process
crashes with reentrant malloc on first allocation. Outer trigger:
CheckedLockImpl::Acquire (DCHECK-only) allocates on PostTask -> enters
PartitionAlloc -> ThreadCache::Get; on this path the `static
thread_local MetricsSubSampler g_shared_subsampler` (added by
https://crrev.com/c/6202281) is constructed, and its ctor seeds
InsecureRandomGenerator via base::RandUint64() -> BoringSSL RAND_bytes
-> OPENSSL_malloc, tripping ScopedDisallowAllocations.

Defer seeding to the first RandUint64() call. (0, 0) is XorShift128+'s
unique fixed point, so it doubles as the unseeded sentinel without a
flag (no size change). ReseedForTesting(0) now CHECKs; no caller
passes 0. Tactical fix: any other dynamic-init thread_local in
libcef.dll whose ctor allocates could crash similarly in DCHECK
builds.
2026-05-22 12:12:14 -04:00