diff --git a/ivette/src/frama-c/plugins/region/api/index.ts b/ivette/src/frama-c/plugins/region/api/index.ts index 8d4530d2f5490ad1f3ca236b0244437ca67c187d..5d01bdbe22ac529ecefaa43e5a11963c12441397 100644 --- a/ivette/src/frama-c/plugins/region/api/index.ts +++ b/ivette/src/frama-c/plugins/region/api/index.ts @@ -149,6 +149,7 @@ const compute_internal: Server.ExecRequest<decl,null> = { name: 'plugins.region.compute', input: jDecl, output: Json.jNull, + fallback: null, signals: [], }; /** Compute regions for the given declaration */ @@ -159,6 +160,7 @@ const regions_internal: Server.GetRequest<decl,region[]> = { name: 'plugins.region.regions', input: jDecl, output: Json.jArray(jRegion), + fallback: [], signals: [ { name: 'plugins.region.updated' } ], }; /** Returns computed regions for the given declaration */ @@ -169,6 +171,7 @@ const regionsAt_internal: Server.GetRequest<[ marker, boolean ],region[]> = { name: 'plugins.region.regionsAt', input: Json.jPair( jMarker, Json.jBoolean,), output: Json.jArray(jRegion), + fallback: [], signals: [ { name: 'plugins.region.updated' } ], }; /** Compute regions at the given marker */ @@ -183,6 +186,7 @@ const localize_internal: Server.GetRequest< name: 'plugins.region.localize', input: Json.jPair( jMarker, Json.jBoolean,), output: Json.jOption(jNode), + fallback: undefined, signals: [ { name: 'plugins.region.updated' } ], }; /** Localize in the local (true) or global map (false) */ diff --git a/ivette/src/frama-c/plugins/region/index.tsx b/ivette/src/frama-c/plugins/region/index.tsx index d489e0a5a214626a7a8abb04af7c0346ff75207d..eed8bea5b81bb105826aaab9a9c1e05b85593f5a 100644 --- a/ivette/src/frama-c/plugins/region/index.tsx +++ b/ivette/src/frama-c/plugins/region/index.tsx @@ -45,8 +45,7 @@ function RegionAnalys(): JSX.Element { const setComputing = Dome.useProtected(setRunning); const scope = States.useCurrentScope(); const { kind, name } = States.useDeclaration(scope); - const regions = - States.useRequest(Region.regions, kf, { pending: null }) ?? []; + const regions = States.useRequestStable(Region.regions, kf); React.useEffect(() => { if (!pinned && kind === 'FUNCTION' && scope !== kf) { setKf(scope);