chore(deps): bump purego-cef to v0.14.1
v0.14.0 pinned the CEF API 15000 contract and fixed the struct ABI corruption that made BrowserSettings.BackgroundColor land on chrome_status_bubble (transparent windowless canvas). v0.14.1 restores the global function bindings dropped by that regeneration (DictionaryValueCreate, V8ContextGetCurrentContext, all *Create factories) and fixes global factory ownership so created objects are adopted without a leaked reference. This makes the white-canvas fix in this branch effective: the opaque white BrowserSettings.BackgroundColor now actually reaches libcef.
- commit
- 902c404508da47722a324d2f14b2a4cfc04a2812
- author
- brice · · 2026-07-21 19:07 UTC
- parent
- 1dc7dd4
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
75 files · +1836 -1983
M go.mod +1 -1
| @@ -6,7 +6,7 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 9 | - | github.com/bnema/purego-cef v0.13.4 | |
| 9 | + | github.com/bnema/purego-cef v0.14.1 | |
| 10 | 10 | github.com/bnema/purego-cef2gtk v0.8.5 | |
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5 | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4 | |
| @@ -6,7 +6,7 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 9 | - | github.com/bnema/purego-cef v0.13.4 | 9 | + | github.com/bnema/purego-cef v0.14.1 |
| 10 | github.com/bnema/purego-cef2gtk v0.8.5 | 10 | github.com/bnema/purego-cef2gtk v0.8.5 | ||
| 11 | github.com/bnema/purego-pipewire v0.1.5 | 11 | github.com/bnema/purego-pipewire v0.1.5 | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4 | 12 | github.com/bnema/purego-sqlite v0.1.4 | ||
M go.sum +2 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_browser_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_command_line_gen.go +15 -2 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/cef_component_updater_gen.go +323 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_cookie_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_drag_data_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_image_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_media_router_gen.go +24 -41 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_menu_model_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_parser_gen.go +10 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_preference_gen.go +14 -1
| @@ -259,6 +259,19 @@ func wrapPreferenceManager(ptr unsafe.Pointer) PreferenceManager { | |||
| 259 | 259 | return impl | |
| 260 | 260 | } | |
| 261 | 261 | ||
| 262 | + | // takePreferenceManager adopts a CEF PreferenceManager pointer whose reference is already owned by | |
| 263 | + | // the caller (as returned by a global factory function). Unlike wrapPreferenceManager it | |
| 264 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 265 | + | func takePreferenceManager(ptr unsafe.Pointer) PreferenceManager { | |
| 266 | + | if ptr == nil { | |
| 267 | + | return nil | |
| 268 | + | } | |
| 269 | + | r := (*capi.CEFPreferenceManagerT)(ptr) | |
| 270 | + | impl := &preferenceManagerImpl{rawPtr: r} | |
| 271 | + | runtime.SetFinalizer(impl, (*preferenceManagerImpl).Release) | |
| 272 | + | return impl | |
| 273 | + | } | |
| 274 | + | ||
| 262 | 275 | // PreferenceManagerGetChromeVariationsAsSwitches Returns the current Chrome Variations configuration (combination of field trials and chrome://flags) as equivalent command-line switches (`--[enable|disable]-features=XXXX`, etc). These switches can be used to apply the same configuration when launching a CEF-based application. See https://developer.chrome.com/docs/web-platform/chrome-variations for background and details. Note that field trial tests are disabled by default in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` GN flag). This function must be called on the browser process UI thread. | |
| 263 | 276 | func PreferenceManagerGetChromeVariationsAsSwitches(switches StringList) { | |
| 264 | 277 | capi.CEFPreferenceManagerGetChromeVariationsAsSwitches(uintptr(switches)) | |
| @@ -272,5 +285,5 @@ func PreferenceManagerGetChromeVariationsAsStrings(strings StringList) { | |||
| 272 | 285 | // PreferenceManagerGetGlobal Returns the global preference manager object. | |
| 273 | 286 | func PreferenceManagerGetGlobal() PreferenceManager { | |
| 274 | 287 | ret := capi.CEFPreferenceManagerGetGlobal() | |
| 275 | - | return wrapPreferenceManager(ret) | |
| 288 | + | return takePreferenceManager(ret) | |
| 276 | 289 | } | |
| @@ -259,6 +259,19 @@ func wrapPreferenceManager(ptr unsafe.Pointer) PreferenceManager { | |||||
| 259 | return impl | 259 | return impl | ||
| 260 | } | 260 | } | ||
| 261 | 261 | ||||
| 262 | + | // takePreferenceManager adopts a CEF PreferenceManager pointer whose reference is already owned by | |||
| 263 | + | // the caller (as returned by a global factory function). Unlike wrapPreferenceManager it | |||
| 264 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 265 | + | func takePreferenceManager(ptr unsafe.Pointer) PreferenceManager { | |||
| 266 | + | if ptr == nil { | |||
| 267 | + | return nil | |||
| 268 | + | } | |||
| 269 | + | r := (*capi.CEFPreferenceManagerT)(ptr) | |||
| 270 | + | impl := &preferenceManagerImpl{rawPtr: r} | |||
| 271 | + | runtime.SetFinalizer(impl, (*preferenceManagerImpl).Release) | |||
| 272 | + | return impl | |||
| 273 | + | } | |||
| 274 | + | ||||
| 262 | // PreferenceManagerGetChromeVariationsAsSwitches Returns the current Chrome Variations configuration (combination of field trials and chrome://flags) as equivalent command-line switches (`--[enable|disable]-features=XXXX`, etc). These switches can be used to apply the same configuration when launching a CEF-based application. See https://developer.chrome.com/docs/web-platform/chrome-variations for background and details. Note that field trial tests are disabled by default in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` GN flag). This function must be called on the browser process UI thread. | 275 | // PreferenceManagerGetChromeVariationsAsSwitches Returns the current Chrome Variations configuration (combination of field trials and chrome://flags) as equivalent command-line switches (`--[enable|disable]-features=XXXX`, etc). These switches can be used to apply the same configuration when launching a CEF-based application. See https://developer.chrome.com/docs/web-platform/chrome-variations for background and details. Note that field trial tests are disabled by default in Official CEF builds (via the `disable_fieldtrial_testing_config=true (1)` GN flag). This function must be called on the browser process UI thread. | ||
| 263 | func PreferenceManagerGetChromeVariationsAsSwitches(switches StringList) { | 276 | func PreferenceManagerGetChromeVariationsAsSwitches(switches StringList) { | ||
| 264 | capi.CEFPreferenceManagerGetChromeVariationsAsSwitches(uintptr(switches)) | 277 | capi.CEFPreferenceManagerGetChromeVariationsAsSwitches(uintptr(switches)) | ||
| @@ -272,5 +285,5 @@ func PreferenceManagerGetChromeVariationsAsStrings(strings StringList) { | |||||
| 272 | // PreferenceManagerGetGlobal Returns the global preference manager object. | 285 | // PreferenceManagerGetGlobal Returns the global preference manager object. | ||
| 273 | func PreferenceManagerGetGlobal() PreferenceManager { | 286 | func PreferenceManagerGetGlobal() PreferenceManager { | ||
| 274 | ret := capi.CEFPreferenceManagerGetGlobal() | 287 | ret := capi.CEFPreferenceManagerGetGlobal() | ||
| 275 | - | return wrapPreferenceManager(ret) | 288 | + | return takePreferenceManager(ret) |
| 276 | } | 289 | } | ||