mirror of
https://github.com/aphrody-labs/cef-rs.git
synced 2026-10-14 05:09:23 +00:00
On macOS, CEF requires calling `cef_api_hash` immediately after `cef_load_library` in both the main process and helper processes. This initialization is necessary to ensure that CEF functions are correctly configured and available before any other API calls. Without this, calling CEF APIs such as `args.as_cmd_line()` which invokes `cef_command_line_create` before `execute_process` results in undefined behavior or crashes. This patch aligns the cef-rs' cefsimple macOS helper with the official CEF C API implementation. References: - https://chromiumembedded.github.io/cef/using_the_capi#api-version-initialization - https://github.com/chromiumembedded/cef/blob/5f93c2b090d19659451de4dfe44896ad7dbfd832/tests/cefsimple_capi/cefsimple_mac.m#L105-L107