Revert "fix(memory): bound OOM-prone accumulators (#10179)" (#10255)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Neil
2026-07-23 18:35:31 -07:00
committed by GitHub
co-authored by Orca
parent 6eb70d8370
commit aab112933e
1577 changed files with 15167 additions and 91655 deletions
@@ -1,5 +1,4 @@
import { remoteRuntimeUnavailableError } from './remote-runtime-request-frames'
import { takeRemoteRuntimePreparedRequest } from './remote-runtime-prepared-request-admission'
import { finishSharedControlSubscription } from './remote-runtime-shared-control-state'
import type {
SharedControlLogicalSubscription,
@@ -9,15 +8,23 @@ import type {
export function sendSharedControlRequest(args: {
pendingRequests: Map<string, SharedControlPendingRequest<unknown>>
requestId: string
send: (serializedRequest: string) => boolean
deviceToken: string
method: string
params: unknown
send: (payload: unknown) => boolean
reject: (requestId: string, error: Error) => void
}): void {
const pending = args.pendingRequests.get(args.requestId)
if (!pending) {
if (!args.pendingRequests.has(args.requestId)) {
return
}
const serializedRequest = takeRemoteRuntimePreparedRequest(pending)
if (serializedRequest === null || !args.send(serializedRequest)) {
if (
!args.send({
id: args.requestId,
deviceToken: args.deviceToken,
method: args.method,
params: args.params
})
) {
args.reject(args.requestId, remoteRuntimeUnavailableError())
}
}