From e23fc6d88cc26a234ef2795d0bea1fd2f7fb8bfa Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Tue, 13 Feb 2024 19:44:37 -0700 Subject: chore: deno_core bump (#22407) - Adding `None` flag for warmup script. - Modify opcall trace interface to match new Rust implementation --- cli/js/40_test.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cli/js/40_test.js') diff --git a/cli/js/40_test.js b/cli/js/40_test.js index b9735fc01..14adb5216 100644 --- a/cli/js/40_test.js +++ b/cli/js/40_test.js @@ -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] }, }; }; } -- cgit v1.2.3