Skip to content

Commit

Permalink
fix(inspector): crash on "Debugger.setBlackboxPatterns" (denoland#24204)
Browse files Browse the repository at this point in the history
Closes denoland#24196

---------

Co-authored-by: Divy Srivastava <[email protected]>
  • Loading branch information
bartlomieju and littledivy committed Jun 14, 2024
1 parent 9092a23 commit 184a85e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 7 additions & 5 deletions tests/integration/inspector_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,"#
Expand All @@ -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;
Expand Down

0 comments on commit 184a85e

Please sign in to comment.