mirror of
https://github.com/morluto/rea
synced 2026-10-26 22:28:27 -04:00
fix(electron): retain scoped IPC registration provenance (#7031)
* fix(electron): retain scoped IPC registration provenance * fix(electron): defer mutation analysis until scoped receiver admission
This commit is contained in:
@@ -67,10 +67,17 @@ const locatedHandler = {
|
||||
]),
|
||||
handler_location: range,
|
||||
};
|
||||
const ipcReceiver = z
|
||||
.strictObject({
|
||||
kind: z.enum(["web-contents", "main-frame"]),
|
||||
owner_location: range,
|
||||
})
|
||||
.exactOptional();
|
||||
const ipcChannel = <Shape extends z.ZodRawShape>(shape: Shape) =>
|
||||
z.union([
|
||||
z.strictObject({
|
||||
...findingContext,
|
||||
receiver: ipcReceiver,
|
||||
invocation_location: range.optional(),
|
||||
resolution_basis: z.literal("wrapper-substitution").optional(),
|
||||
...shape,
|
||||
@@ -79,6 +86,7 @@ const ipcChannel = <Shape extends z.ZodRawShape>(shape: Shape) =>
|
||||
}),
|
||||
z.strictObject({
|
||||
...findingContext,
|
||||
receiver: ipcReceiver,
|
||||
invocation_location: range.optional(),
|
||||
resolution_basis: z.literal("wrapper-substitution").optional(),
|
||||
...shape,
|
||||
|
||||
Reference in New Issue
Block a user