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
| @@ -270,6 +270,19 @@ func wrapRequest(ptr unsafe.Pointer) Request { | |||
| 270 | 270 | return impl | |
| 271 | 271 | } | |
| 272 | 272 | ||
| 273 | + | // takeRequest adopts a CEF Request pointer whose reference is already owned by | |
| 274 | + | // the caller (as returned by a global factory function). Unlike wrapRequest it | |
| 275 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 276 | + | func takeRequest(ptr unsafe.Pointer) Request { | |
| 277 | + | if ptr == nil { | |
| 278 | + | return nil | |
| 279 | + | } | |
| 280 | + | r := (*capi.CEFRequestT)(ptr) | |
| 281 | + | impl := &requestImpl{rawPtr: r} | |
| 282 | + | runtime.SetFinalizer(impl, (*requestImpl).Release) | |
| 283 | + | return impl | |
| 284 | + | } | |
| 285 | + | ||
| 273 | 286 | // PostData Structure used to represent post data for a web request. The functions of this structure may be called on any thread. | |
| 274 | 287 | type PostData = portin.PostData | |
| 275 | 288 | ||
| @@ -400,6 +413,19 @@ func wrapPostData(ptr unsafe.Pointer) PostData { | |||
| 400 | 413 | return impl | |
| 401 | 414 | } | |
| 402 | 415 | ||
| 416 | + | // takePostData adopts a CEF PostData pointer whose reference is already owned by | |
| 417 | + | // the caller (as returned by a global factory function). Unlike wrapPostData it | |
| 418 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 419 | + | func takePostData(ptr unsafe.Pointer) PostData { | |
| 420 | + | if ptr == nil { | |
| 421 | + | return nil | |
| 422 | + | } | |
| 423 | + | r := (*capi.CEFPostDataT)(ptr) | |
| 424 | + | impl := &postDataImpl{rawPtr: r} | |
| 425 | + | runtime.SetFinalizer(impl, (*postDataImpl).Release) | |
| 426 | + | return impl | |
| 427 | + | } | |
| 428 | + | ||
| 403 | 429 | // PostDataElement Structure used to represent a single element in the request post data. The functions of this structure may be called on any thread. | |
| 404 | 430 | type PostDataElement = portin.PostDataElement | |
| 405 | 431 | ||
| @@ -518,20 +544,33 @@ func wrapPostDataElement(ptr unsafe.Pointer) PostDataElement { | |||
| 518 | 544 | return impl | |
| 519 | 545 | } | |
| 520 | 546 | ||
| 547 | + | // takePostDataElement adopts a CEF PostDataElement pointer whose reference is already owned by | |
| 548 | + | // the caller (as returned by a global factory function). Unlike wrapPostDataElement it | |
| 549 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 550 | + | func takePostDataElement(ptr unsafe.Pointer) PostDataElement { | |
| 551 | + | if ptr == nil { | |
| 552 | + | return nil | |
| 553 | + | } | |
| 554 | + | r := (*capi.CEFPostDataElementT)(ptr) | |
| 555 | + | impl := &postDataElementImpl{rawPtr: r} | |
| 556 | + | runtime.SetFinalizer(impl, (*postDataElementImpl).Release) | |
| 557 | + | return impl | |
| 558 | + | } | |
| 559 | + | ||
| 521 | 560 | // RequestCreate Create a new cef_request_t object. | |
| 522 | 561 | func RequestCreate() Request { | |
| 523 | 562 | ret := capi.CEFRequestCreate() | |
| 524 | - | return wrapRequest(ret) | |
| 563 | + | return takeRequest(ret) | |
| 525 | 564 | } | |
| 526 | 565 | ||
| 527 | 566 | // PostDataCreate Create a new cef_post_data_t object. | |
| 528 | 567 | func PostDataCreate() PostData { | |
| 529 | 568 | ret := capi.CEFPostDataCreate() | |
| 530 | - | return wrapPostData(ret) | |
| 569 | + | return takePostData(ret) | |
| 531 | 570 | } | |
| 532 | 571 | ||
| 533 | 572 | // PostDataElementCreate Create a new cef_post_data_element_t object. | |
| 534 | 573 | func PostDataElementCreate() PostDataElement { | |
| 535 | 574 | ret := capi.CEFPostDataElementCreate() | |
| 536 | - | return wrapPostDataElement(ret) | |
| 575 | + | return takePostDataElement(ret) | |
| 537 | 576 | } | |
| @@ -270,6 +270,19 @@ func wrapRequest(ptr unsafe.Pointer) Request { | |||||
| 270 | return impl | 270 | return impl | ||
| 271 | } | 271 | } | ||
| 272 | 272 | ||||
| 273 | + | // takeRequest adopts a CEF Request pointer whose reference is already owned by | |||
| 274 | + | // the caller (as returned by a global factory function). Unlike wrapRequest it | |||
| 275 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 276 | + | func takeRequest(ptr unsafe.Pointer) Request { | |||
| 277 | + | if ptr == nil { | |||
| 278 | + | return nil | |||
| 279 | + | } | |||
| 280 | + | r := (*capi.CEFRequestT)(ptr) | |||
| 281 | + | impl := &requestImpl{rawPtr: r} | |||
| 282 | + | runtime.SetFinalizer(impl, (*requestImpl).Release) | |||
| 283 | + | return impl | |||
| 284 | + | } | |||
| 285 | + | ||||
| 273 | // PostData Structure used to represent post data for a web request. The functions of this structure may be called on any thread. | 286 | // PostData Structure used to represent post data for a web request. The functions of this structure may be called on any thread. | ||
| 274 | type PostData = portin.PostData | 287 | type PostData = portin.PostData | ||
| 275 | 288 | ||||
| @@ -400,6 +413,19 @@ func wrapPostData(ptr unsafe.Pointer) PostData { | |||||
| 400 | return impl | 413 | return impl | ||
| 401 | } | 414 | } | ||
| 402 | 415 | ||||
| 416 | + | // takePostData adopts a CEF PostData pointer whose reference is already owned by | |||
| 417 | + | // the caller (as returned by a global factory function). Unlike wrapPostData it | |||
| 418 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 419 | + | func takePostData(ptr unsafe.Pointer) PostData { | |||
| 420 | + | if ptr == nil { | |||
| 421 | + | return nil | |||
| 422 | + | } | |||
| 423 | + | r := (*capi.CEFPostDataT)(ptr) | |||
| 424 | + | impl := &postDataImpl{rawPtr: r} | |||
| 425 | + | runtime.SetFinalizer(impl, (*postDataImpl).Release) | |||
| 426 | + | return impl | |||
| 427 | + | } | |||
| 428 | + | ||||
| 403 | // PostDataElement Structure used to represent a single element in the request post data. The functions of this structure may be called on any thread. | 429 | // PostDataElement Structure used to represent a single element in the request post data. The functions of this structure may be called on any thread. | ||
| 404 | type PostDataElement = portin.PostDataElement | 430 | type PostDataElement = portin.PostDataElement | ||
| 405 | 431 | ||||
| @@ -518,20 +544,33 @@ func wrapPostDataElement(ptr unsafe.Pointer) PostDataElement { | |||||
| 518 | return impl | 544 | return impl | ||
| 519 | } | 545 | } | ||
| 520 | 546 | ||||
| 547 | + | // takePostDataElement adopts a CEF PostDataElement pointer whose reference is already owned by | |||
| 548 | + | // the caller (as returned by a global factory function). Unlike wrapPostDataElement it | |||
| 549 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 550 | + | func takePostDataElement(ptr unsafe.Pointer) PostDataElement { | |||
| 551 | + | if ptr == nil { | |||
| 552 | + | return nil | |||
| 553 | + | } | |||
| 554 | + | r := (*capi.CEFPostDataElementT)(ptr) | |||
| 555 | + | impl := &postDataElementImpl{rawPtr: r} | |||
| 556 | + | runtime.SetFinalizer(impl, (*postDataElementImpl).Release) | |||
| 557 | + | return impl | |||
| 558 | + | } | |||
| 559 | + | ||||
| 521 | // RequestCreate Create a new cef_request_t object. | 560 | // RequestCreate Create a new cef_request_t object. | ||
| 522 | func RequestCreate() Request { | 561 | func RequestCreate() Request { | ||
| 523 | ret := capi.CEFRequestCreate() | 562 | ret := capi.CEFRequestCreate() | ||
| 524 | - | return wrapRequest(ret) | 563 | + | return takeRequest(ret) |
| 525 | } | 564 | } | ||
| 526 | 565 | ||||
| 527 | // PostDataCreate Create a new cef_post_data_t object. | 566 | // PostDataCreate Create a new cef_post_data_t object. | ||
| 528 | func PostDataCreate() PostData { | 567 | func PostDataCreate() PostData { | ||
| 529 | ret := capi.CEFPostDataCreate() | 568 | ret := capi.CEFPostDataCreate() | ||
| 530 | - | return wrapPostData(ret) | 569 | + | return takePostData(ret) |
| 531 | } | 570 | } | ||
| 532 | 571 | ||||
| 533 | // PostDataElementCreate Create a new cef_post_data_element_t object. | 572 | // PostDataElementCreate Create a new cef_post_data_element_t object. | ||
| 534 | func PostDataElementCreate() PostDataElement { | 573 | func PostDataElementCreate() PostDataElement { | ||
| 535 | ret := capi.CEFPostDataElementCreate() | 574 | ret := capi.CEFPostDataElementCreate() | ||
| 536 | - | return wrapPostDataElement(ret) | 575 | + | return takePostDataElement(ret) |
| 537 | } | 576 | } | ||