more child-process (#18688)

Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
This commit is contained in:
pfg
2025-05-06 22:12:24 -07:00
committed by GitHub
parent d291b56f8b
commit 00a3cbd977
70 changed files with 2990 additions and 917 deletions

View File

@@ -65,9 +65,9 @@ pub fn sendHelperChild(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFram
}
};
const good = ipc_instance.data.serializeAndSendInternal(globalThis, message);
const good = ipc_instance.data.serializeAndSend(globalThis, message, .internal, .null, null);
if (!good) {
if (good == .failure) {
const ex = globalThis.createTypeErrorInstance("sendInternal() failed", .{});
ex.put(globalThis, ZigString.static("syscall"), bun.String.static("write").toJS(globalThis));
const fnvalue = JSC.JSFunction.create(globalThis, "", S.impl, 1, .{});
@@ -75,7 +75,7 @@ pub fn sendHelperChild(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFram
return .false;
}
return .true;
return if (good == .success) .true else .false;
}
pub fn onInternalMessageChild(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {
@@ -210,10 +210,8 @@ pub fn sendHelperPrimary(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFr
if (Environment.isDebug) log("primary: {}", .{message.toFmt(&formatter)});
_ = handle;
const success = ipc_data.serializeAndSendInternal(globalThis, message);
if (!success) return .false;
return .true;
const success = ipc_data.serializeAndSend(globalThis, message, .internal, .null, null);
return if (success == .success) .true else .false;
}
pub fn onInternalMessagePrimary(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {