chore: deno_core bump (#22407)

- Adding `None` flag for warmup script.
 - Modify opcall trace interface to match new Rust implementation
This commit is contained in:
Matt Mastracci 2024-02-13 19:44:37 -07:00 committed by GitHub
parent 082f8128b8
commit e23fc6d88c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 64 additions and 57 deletions

View file

@ -156,6 +156,7 @@ function populateOpNames() {
function assertOps(fn) {
/** @param desc {TestDescription | TestStepDescription} */
return async function asyncOpSanitizer(desc) {
let hasTraces = false;
if (opNames === null) populateOpNames();
const res = op_test_op_sanitizer_collect(
desc.id,
@ -220,8 +221,7 @@ function assertOps(fn) {
message += ` This is often caused by not ${hint}.`;
}
const traces = [];
for (const [id, { opName: traceOpName, stack }] of postTraces) {
if (traceOpName !== opName) continue;
for (const [id, stack] of postTraces) {
if (MapPrototypeHas(preTraces, id)) continue;
ArrayPrototypePush(traces, stack);
}
@ -232,6 +232,7 @@ function assertOps(fn) {
message += " The operations were started here:\n";
message += ArrayPrototypeJoin(traces, "\n\n");
}
hasTraces |= traces.length > 0;
ArrayPrototypePush(details, message);
} else if (diff < 0) {
const [name, hint] = op_test_op_sanitizer_get_async_message(opName);
@ -247,8 +248,7 @@ function assertOps(fn) {
message += ` This is often caused by not ${hint}.`;
}
const traces = [];
for (const [id, { opName: traceOpName, stack }] of preTraces) {
if (opName !== traceOpName) continue;
for (const [id, stack] of preTraces) {
if (MapPrototypeHas(postTraces, id)) continue;
ArrayPrototypePush(traces, stack);
}
@ -259,6 +259,7 @@ function assertOps(fn) {
message += " The operations were started here:\n";
message += ArrayPrototypeJoin(traces, "\n\n");
}
hasTraces |= traces.length > 0;
ArrayPrototypePush(details, message);
} else {
throw new Error("unreachable");
@ -266,7 +267,7 @@ function assertOps(fn) {
}
return {
failed: { leakedOps: [details, core.isOpCallTracingEnabled()] },
failed: { leakedOps: [details, hasTraces] },
};
};
}