mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
feat(errors): carry the value of Go, Rust, IL2CPP, sigrok, Electron fuse, CDP, projection and assetutil allowances (#11645)
Each of these fixed allowances now passes limit and unit, traced to the constant or parse refusal that produced it. The Electron fuse, CDP runtime retention and assetutil names no longer embed the value.
This commit is contained in:
1 parent
836ac2fea6
commit
680c83f88c
14 files changed
+123
-42
No files matched your search
@@ -15,6 +15,10 @@ describe("RuntimeRetention", () => {
|
||||
retained_bytes: WEB_RUNTIME_LIMITS.retainedEventBytes + 5,
|
||||
limit_bytes: WEB_RUNTIME_LIMITS.retainedEventBytes,
|
||||
}),
|
||||
fixedAllowance: expect.objectContaining({
|
||||
limit: WEB_RUNTIME_LIMITS.retainedEventBytes,
|
||||
unit: "bytes",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -16,18 +16,18 @@ const retentionExceeded = (
|
||||
retainedBytes: number,
|
||||
): AnalysisResourceConstraintError => {
|
||||
const limit = retentionLimit(kind);
|
||||
const allowance = `Complete browser runtime ${kind} retention (${String(limit)} bytes)`;
|
||||
const allowance = `Complete browser runtime ${kind} retention`;
|
||||
return new AnalysisResourceConstraintError(
|
||||
operation,
|
||||
"capacity",
|
||||
`${allowance} exceeded; no partial runtime result is returned.`,
|
||||
`${allowance} (${String(limit)} bytes) exceeded; no partial runtime result is returned.`,
|
||||
{
|
||||
boundary: "browser-runtime-retention",
|
||||
kind,
|
||||
retained_bytes: retainedBytes,
|
||||
limit_bytes: limit,
|
||||
},
|
||||
fixedAllowanceOptions(allowance, "live"),
|
||||
fixedAllowanceOptions(allowance, "live", { limit, unit: "bytes" }),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user