chore: narrow wasm backend entrypoint API

This commit is contained in:
udo
2026-06-13 22:32:02 +00:00
parent af6500d134
commit b1856c1725
4 changed files with 22 additions and 63 deletions
+2 -6
View File
@@ -958,10 +958,10 @@ int handle_complete(FastCGIRequest& request) {
// wasm invocation: Wasmtime uses host signals internally to implement
// guest traps, and the native handler would otherwise turn a clean
// guest trap into a native fatal signal. Sets failure_* on error.
auto serve_via_wasm = [&](const String& entry_unit, int32_t kind, const String& handler_name = "") {
auto serve_via_wasm = [&](const String& entry_unit, int32_t kind) {
request_fault_active = 0;
restore_request_fault_handlers();
String wasm_error = wasm_backend_serve(request, entry_unit, kind, handler_name);
String wasm_error = wasm_backend_serve(request, entry_unit, kind);
install_request_fault_handlers();
request_fault_active = 1;
if(wasm_error != "")
@@ -1251,10 +1251,6 @@ void custom_server_http_dispatcher_loop(String key)
custom_server_dispatcher_key = key;
close_inherited_server_sockets();
install_process_fault_handlers();
// This broker is forked from a worker that may already hold a wasm engine;
// drop the inherited (unusable post-fork) engine so it re-inits its own.
wasm_backend_reset_after_fork();
StringMap cfg = custom_server_read_config(key);
if(cfg["type"] != "http" || cfg["bind"] == "")
{