MCPcopy Index your code
hub / github.com/react/react / cleanup

Function cleanup

packages/react/src/ReactTaint.js:33–46  ·  view source on GitHub ↗
(entryValue: string | bigint)

Source from the content-addressed store, hash-verified

31 'This would leak it to the client.';
32
33function cleanup(entryValue: string | bigint): void {
34 const entry = TaintRegistryValues.get(entryValue);
35 if (entry !== undefined) {
36 TaintRegistryPendingRequests.forEach(function (requestQueue) {
37 requestQueue.push(entryValue);
38 entry.count++;
39 });
40 if (entry.count === 1) {
41 TaintRegistryValues.delete(entryValue);
42 } else {
43 entry.count--;
44 }
45 }
46}
47
48// If FinalizationRegistry doesn't exist, we assume that objects life forever.
49// E.g. the whole VM is just the lifetime of a request.

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
forEachMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected