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 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_print_settings_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_process_message_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_request_context_gen.go +16 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_request_gen.go +42 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_resource_bundle_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_response_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_shared_memory_region_gen.go +3 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_shared_process_message_builder_gen.go +20 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_stream_gen.go +34 -5 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_task_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_task_manager_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_thread_gen.go +14 -1 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/cef_types_component_gen.go +45 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_types_content_settings_gen.go +72 -79 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_types_gen.go +59 -52 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_urlrequest_gen.go +14 -1
| @@ -121,6 +121,19 @@ func wrapUrlrequest(ptr unsafe.Pointer) Urlrequest { | |||
| 121 | 121 | return impl | |
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | + | // takeUrlrequest adopts a CEF Urlrequest pointer whose reference is already owned by | |
| 125 | + | // the caller (as returned by a global factory function). Unlike wrapUrlrequest it | |
| 126 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 127 | + | func takeUrlrequest(ptr unsafe.Pointer) Urlrequest { | |
| 128 | + | if ptr == nil { | |
| 129 | + | return nil | |
| 130 | + | } | |
| 131 | + | r := (*capi.CEFUrlrequestT)(ptr) | |
| 132 | + | impl := &urlrequestImpl{rawPtr: r} | |
| 133 | + | runtime.SetFinalizer(impl, (*urlrequestImpl).Release) | |
| 134 | + | return impl | |
| 135 | + | } | |
| 136 | + | ||
| 124 | 137 | // UrlrequestClient Structure that should be implemented by the cef_urlrequest_t client. The functions of this structure will be called on the same thread that created the request unless otherwise documented. | |
| 125 | 138 | type UrlrequestClient = portin.UrlrequestClient | |
| 126 | 139 | ||
| @@ -346,5 +359,5 @@ func wrapUrlrequestClient(ptr unsafe.Pointer) UrlrequestClient { | |||
| 346 | 359 | // UrlrequestCreate Create a new URL request that is not associated with a specific browser or frame. Use cef_frame_t::CreateURLRequest instead if you want the request to have this association, in which case it may be handled differently (see documentation on that function). A request created with this function may only originate from the browser process, and will behave as follows: - It may be intercepted by the client via CefResourceRequestHandler or CefSchemeHandlerFactory. - POST data may only contain only a single element of type PDE_TYPE_FILE or PDE_TYPE_BYTES. - If |request_context| is empty the global request context will be used. The |request| object will be marked as read-only after calling this function. | |
| 347 | 360 | func UrlrequestCreate(request Request, client UrlrequestClient, requestContext RequestContext) Urlrequest { | |
| 348 | 361 | ret := capi.CEFUrlrequestCreate(extractRawPointer(request), extractOrWrapRawPointer(client, func() any { return NewUrlrequestClient(client) }), extractRawPointer(requestContext)) | |
| 349 | - | return wrapUrlrequest(ret) | |
| 362 | + | return takeUrlrequest(ret) | |
| 350 | 363 | } | |
| @@ -121,6 +121,19 @@ func wrapUrlrequest(ptr unsafe.Pointer) Urlrequest { | |||||
| 121 | return impl | 121 | return impl | ||
| 122 | } | 122 | } | ||
| 123 | 123 | ||||
| 124 | + | // takeUrlrequest adopts a CEF Urlrequest pointer whose reference is already owned by | |||
| 125 | + | // the caller (as returned by a global factory function). Unlike wrapUrlrequest it | |||
| 126 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 127 | + | func takeUrlrequest(ptr unsafe.Pointer) Urlrequest { | |||
| 128 | + | if ptr == nil { | |||
| 129 | + | return nil | |||
| 130 | + | } | |||
| 131 | + | r := (*capi.CEFUrlrequestT)(ptr) | |||
| 132 | + | impl := &urlrequestImpl{rawPtr: r} | |||
| 133 | + | runtime.SetFinalizer(impl, (*urlrequestImpl).Release) | |||
| 134 | + | return impl | |||
| 135 | + | } | |||
| 136 | + | ||||
| 124 | // UrlrequestClient Structure that should be implemented by the cef_urlrequest_t client. The functions of this structure will be called on the same thread that created the request unless otherwise documented. | 137 | // UrlrequestClient Structure that should be implemented by the cef_urlrequest_t client. The functions of this structure will be called on the same thread that created the request unless otherwise documented. | ||
| 125 | type UrlrequestClient = portin.UrlrequestClient | 138 | type UrlrequestClient = portin.UrlrequestClient | ||
| 126 | 139 | ||||
| @@ -346,5 +359,5 @@ func wrapUrlrequestClient(ptr unsafe.Pointer) UrlrequestClient { | |||||
| 346 | // UrlrequestCreate Create a new URL request that is not associated with a specific browser or frame. Use cef_frame_t::CreateURLRequest instead if you want the request to have this association, in which case it may be handled differently (see documentation on that function). A request created with this function may only originate from the browser process, and will behave as follows: - It may be intercepted by the client via CefResourceRequestHandler or CefSchemeHandlerFactory. - POST data may only contain only a single element of type PDE_TYPE_FILE or PDE_TYPE_BYTES. - If |request_context| is empty the global request context will be used. The |request| object will be marked as read-only after calling this function. | 359 | // UrlrequestCreate Create a new URL request that is not associated with a specific browser or frame. Use cef_frame_t::CreateURLRequest instead if you want the request to have this association, in which case it may be handled differently (see documentation on that function). A request created with this function may only originate from the browser process, and will behave as follows: - It may be intercepted by the client via CefResourceRequestHandler or CefSchemeHandlerFactory. - POST data may only contain only a single element of type PDE_TYPE_FILE or PDE_TYPE_BYTES. - If |request_context| is empty the global request context will be used. The |request| object will be marked as read-only after calling this function. | ||
| 347 | func UrlrequestCreate(request Request, client UrlrequestClient, requestContext RequestContext) Urlrequest { | 360 | func UrlrequestCreate(request Request, client UrlrequestClient, requestContext RequestContext) Urlrequest { | ||
| 348 | ret := capi.CEFUrlrequestCreate(extractRawPointer(request), extractOrWrapRawPointer(client, func() any { return NewUrlrequestClient(client) }), extractRawPointer(requestContext)) | 361 | ret := capi.CEFUrlrequestCreate(extractRawPointer(request), extractOrWrapRawPointer(client, func() any { return NewUrlrequestClient(client) }), extractRawPointer(requestContext)) | ||
| 349 | - | return wrapUrlrequest(ret) | 362 | + | return takeUrlrequest(ret) |
| 350 | } | 363 | } | ||