From 184a85eaecbe7055b5b3969391f49c4723ac44fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 14 Jun 2024 22:52:21 +0100 Subject: [PATCH] fix(inspector): crash on "Debugger.setBlackboxPatterns" (#24204) Closes https://github.com/denoland/deno/issues/24196 --------- Co-authored-by: Divy Srivastava --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- tests/integration/inspector_tests.rs | 12 +++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5358d09481..9ba6698b3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1303,9 +1303,9 @@ dependencies = [ [[package]] name = "deno_core" -version = "0.288.0" +version = "0.289.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e569b7a3e463a9f3b111a4279afa06b6909f6ecdc27aeedd3c310a57184ac217" +checksum = "9e22f78a33feec9a7b211253b0aefbb8cb3b0081483ee8cec7bd954c76ac072a" dependencies = [ "anyhow", "bincode", @@ -1761,9 +1761,9 @@ dependencies = [ [[package]] name = "deno_ops" -version = "0.164.0" +version = "0.165.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "748c200b559272ba65d98c25fc38e789901c847c41273e0232cc0df4cf6cad8b" +checksum = "063c6ab08f9275a958878ae54e470cc6ce16f81c1fef16129db0c99d46c5fd35" dependencies = [ "proc-macro-rules", "proc-macro2", @@ -5774,9 +5774,9 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.197.0" +version = "0.198.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8b2ba47cda7f2941f66b4a0eec34b5f21d4ac3566fbc89598ff499a300f406" +checksum = "491380c88077b81b2390e5f0cc10f64860819ba03369bb154bb9e4a587b31a01" dependencies = [ "num-bigint", "serde", diff --git a/Cargo.toml b/Cargo.toml index c301c17497..bba40ecc9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ repository = "https://github.com/denoland/deno" [workspace.dependencies] deno_ast = { version = "=0.39.2", features = ["transpiling"] } -deno_core = { version = "0.288.0" } +deno_core = { version = "0.289.0" } deno_bench_util = { version = "0.150.0", path = "./bench_util" } deno_lockfile = "0.20.0" diff --git a/tests/integration/inspector_tests.rs b/tests/integration/inspector_tests.rs index 7e7bf9e4ed..57831ab46c 100644 --- a/tests/integration/inspector_tests.rs +++ b/tests/integration/inspector_tests.rs @@ -499,12 +499,14 @@ async fn inspector_does_not_hang() { .send_many(&[ json!({"id":1,"method":"Runtime.enable"}), json!({"id":2,"method":"Debugger.enable"}), + json!({"id":3,"method":"Debugger.setBlackboxPatterns","params":{"patterns":["/node_modules/|/bower_components/"]}}), ]) .await; tester.assert_received_messages( &[ r#"{"id":1,"result":{}}"#, - r#"{"id":2,"result":{"debuggerId":"# + r#"{"id":2,"result":{"debuggerId":"#, + r#"{"id":3,"result":"#, ], &[ r#"{"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"# @@ -513,21 +515,21 @@ async fn inspector_does_not_hang() { .await; tester - .send(json!({"id":3,"method":"Runtime.runIfWaitingForDebugger"})) + .send(json!({"id":4,"method":"Runtime.runIfWaitingForDebugger"})) .await; tester .assert_received_messages( - &[r#"{"id":3,"result":{}}"#], + &[r#"{"id":4,"result":{}}"#], &[r#"{"method":"Debugger.paused","#], ) .await; tester - .send(json!({"id":4,"method":"Debugger.resume"})) + .send(json!({"id":5,"method":"Debugger.resume"})) .await; tester .assert_received_messages( - &[r#"{"id":4,"result":{}}"#], + &[r#"{"id":5,"result":{}}"#], &[r#"{"method":"Debugger.resumed","params":{}}"#], ) .await;