mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 17:23:37 +08:00
refactor(v8): derive printable run length from scan offsets (#17327)
This commit is contained in:
@@ -203,7 +203,6 @@ class V8CodeCachePayloadScanner {
|
||||
readonly #maxStrings: number;
|
||||
#cursor = 0;
|
||||
#runStart = -1;
|
||||
#runLength = 0;
|
||||
// not-an-allowance: fixed scratch buffer write length capped at MAX_INSPECT_V8_CODE_CACHE_STRING_BYTES
|
||||
#retainedLength = 0;
|
||||
|
||||
@@ -215,7 +214,7 @@ class V8CodeCachePayloadScanner {
|
||||
|
||||
#flush(): void {
|
||||
if (this.#runStart < 0) return;
|
||||
const runBytes = this.#runLength;
|
||||
const runBytes = this.#cursor - this.#runStart;
|
||||
if (runBytes >= this.#minStringBytes) {
|
||||
if (this.#observations.length >= this.#maxStrings)
|
||||
// The message states the fact. Recovery advice belongs to the provider, which
|
||||
@@ -235,7 +234,6 @@ class V8CodeCachePayloadScanner {
|
||||
});
|
||||
}
|
||||
this.#runStart = -1;
|
||||
this.#runLength = 0;
|
||||
this.#retainedLength = 0;
|
||||
}
|
||||
|
||||
@@ -251,7 +249,6 @@ class V8CodeCachePayloadScanner {
|
||||
this.#runBuffer[this.#retainedLength] = byte;
|
||||
this.#retainedLength += 1;
|
||||
}
|
||||
this.#runLength += 1;
|
||||
} else {
|
||||
this.#flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user