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
| @@ -112,6 +112,19 @@ func wrapCookieManager(ptr unsafe.Pointer) CookieManager { | |||
| 112 | 112 | return impl | |
| 113 | 113 | } | |
| 114 | 114 | ||
| 115 | + | // takeCookieManager adopts a CEF CookieManager pointer whose reference is already owned by | |
| 116 | + | // the caller (as returned by a global factory function). Unlike wrapCookieManager it | |
| 117 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 118 | + | func takeCookieManager(ptr unsafe.Pointer) CookieManager { | |
| 119 | + | if ptr == nil { | |
| 120 | + | return nil | |
| 121 | + | } | |
| 122 | + | r := (*capi.CEFCookieManagerT)(ptr) | |
| 123 | + | impl := &cookieManagerImpl{rawPtr: r} | |
| 124 | + | runtime.SetFinalizer(impl, (*cookieManagerImpl).Release) | |
| 125 | + | return impl | |
| 126 | + | } | |
| 127 | + | ||
| 115 | 128 | // CookieVisitor Structure to implement for visiting cookie values. The functions of this structure will always be called on the UI thread. | |
| 116 | 129 | type CookieVisitor = portin.CookieVisitor | |
| 117 | 130 | ||
| @@ -413,5 +426,5 @@ func wrapDeleteCookiesCallback(ptr unsafe.Pointer) DeleteCookiesCallback { | |||
| 413 | 426 | // CookieManagerGetGlobalManager Returns the global cookie manager. By default data will be stored at cef_settings_t.cache_path if specified or in memory otherwise. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the manager's storage has been initialized. Using this function is equivalent to calling cef_request_context_t::cef_request_context_get_global_context()- >GetDefaultCookieManager(). | |
| 414 | 427 | func CookieManagerGetGlobalManager(callback CompletionCallback) CookieManager { | |
| 415 | 428 | ret := capi.CEFCookieManagerGetGlobalManager(extractOrWrapRawPointer(callback, func() any { return NewCompletionCallback(callback) })) | |
| 416 | - | return wrapCookieManager(ret) | |
| 429 | + | return takeCookieManager(ret) | |
| 417 | 430 | } | |
| @@ -112,6 +112,19 @@ func wrapCookieManager(ptr unsafe.Pointer) CookieManager { | |||||
| 112 | return impl | 112 | return impl | ||
| 113 | } | 113 | } | ||
| 114 | 114 | ||||
| 115 | + | // takeCookieManager adopts a CEF CookieManager pointer whose reference is already owned by | |||
| 116 | + | // the caller (as returned by a global factory function). Unlike wrapCookieManager it | |||
| 117 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 118 | + | func takeCookieManager(ptr unsafe.Pointer) CookieManager { | |||
| 119 | + | if ptr == nil { | |||
| 120 | + | return nil | |||
| 121 | + | } | |||
| 122 | + | r := (*capi.CEFCookieManagerT)(ptr) | |||
| 123 | + | impl := &cookieManagerImpl{rawPtr: r} | |||
| 124 | + | runtime.SetFinalizer(impl, (*cookieManagerImpl).Release) | |||
| 125 | + | return impl | |||
| 126 | + | } | |||
| 127 | + | ||||
| 115 | // CookieVisitor Structure to implement for visiting cookie values. The functions of this structure will always be called on the UI thread. | 128 | // CookieVisitor Structure to implement for visiting cookie values. The functions of this structure will always be called on the UI thread. | ||
| 116 | type CookieVisitor = portin.CookieVisitor | 129 | type CookieVisitor = portin.CookieVisitor | ||
| 117 | 130 | ||||
| @@ -413,5 +426,5 @@ func wrapDeleteCookiesCallback(ptr unsafe.Pointer) DeleteCookiesCallback { | |||||
| 413 | // CookieManagerGetGlobalManager Returns the global cookie manager. By default data will be stored at cef_settings_t.cache_path if specified or in memory otherwise. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the manager's storage has been initialized. Using this function is equivalent to calling cef_request_context_t::cef_request_context_get_global_context()- >GetDefaultCookieManager(). | 426 | // CookieManagerGetGlobalManager Returns the global cookie manager. By default data will be stored at cef_settings_t.cache_path if specified or in memory otherwise. If |callback| is non-NULL it will be executed asnychronously on the UI thread after the manager's storage has been initialized. Using this function is equivalent to calling cef_request_context_t::cef_request_context_get_global_context()- >GetDefaultCookieManager(). | ||
| 414 | func CookieManagerGetGlobalManager(callback CompletionCallback) CookieManager { | 427 | func CookieManagerGetGlobalManager(callback CompletionCallback) CookieManager { | ||
| 415 | ret := capi.CEFCookieManagerGetGlobalManager(extractOrWrapRawPointer(callback, func() any { return NewCompletionCallback(callback) })) | 428 | ret := capi.CEFCookieManagerGetGlobalManager(extractOrWrapRawPointer(callback, func() any { return NewCompletionCallback(callback) })) | ||
| 416 | - | return wrapCookieManager(ret) | 429 | + | return takeCookieManager(ret) |
| 417 | } | 430 | } | ||