Skip to content

Commit

Permalink
fix: inspector causes panic (#404)
Browse files Browse the repository at this point in the history
* chore: patch dependency

* chore: polishing

* chore: update `Cargo.lock`
  • Loading branch information
nyannyacha authored Sep 4, 2024
1 parent e41c1b6 commit 8b29aa1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
9 changes: 3 additions & 6 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ rkyv = "0.7"
tempfile = "3"

[patch.crates-io]
# If the PR is merged upstream, remove the line below.
deno_core = { git = "https://github.com/supabase/deno_core", branch = "293-supabase" }
eszip = { git = "https://github.com/supabase/eszip", branch = "fix-pub-vis-0-72-2" }

[profile.dind]
Expand Down
7 changes: 4 additions & 3 deletions crates/base/src/deno_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,13 @@ where
});
}

let has_inspector = maybe_inspector.is_some();
let rt_provider = create_module_loader_for_standalone_from_eszip_kind(
eszip,
base_dir_path.clone(),
maybe_import_map,
import_map_path,
maybe_inspector.is_some(),
has_inspector,
)
.await?;

Expand Down Expand Up @@ -701,11 +702,11 @@ where
let current_thread_id = std::thread::current().id();
let mut accumulated_cpu_time_ns = 0i64;

let inspector = self.inspector();
let has_inspector = self.inspector().is_some();
let mut mod_result_rx = unsafe {
self.js_runtime.v8_isolate().enter();

if inspector.is_some() {
if has_inspector {
let is_terminated = self.is_terminated.clone();
let mut this = scopeguard::guard_on_unwind(&mut *self, |this| {
this.js_runtime.v8_isolate().exit();
Expand Down

0 comments on commit 8b29aa1

Please sign in to comment.