Skip to content

Commit 8b29aa1

Browse files
authored
fix: inspector causes panic (#404)
* chore: patch dependency * chore: polishing * chore: update `Cargo.lock`
1 parent e41c1b6 commit 8b29aa1

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ rkyv = "0.7"
136136
tempfile = "3"
137137

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

141143
[profile.dind]

crates/base/src/deno_runtime.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,13 @@ where
396396
});
397397
}
398398

399+
let has_inspector = maybe_inspector.is_some();
399400
let rt_provider = create_module_loader_for_standalone_from_eszip_kind(
400401
eszip,
401402
base_dir_path.clone(),
402403
maybe_import_map,
403404
import_map_path,
404-
maybe_inspector.is_some(),
405+
has_inspector,
405406
)
406407
.await?;
407408

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

704-
let inspector = self.inspector();
705+
let has_inspector = self.inspector().is_some();
705706
let mut mod_result_rx = unsafe {
706707
self.js_runtime.v8_isolate().enter();
707708

708-
if inspector.is_some() {
709+
if has_inspector {
709710
let is_terminated = self.is_terminated.clone();
710711
let mut this = scopeguard::guard_on_unwind(&mut *self, |this| {
711712
this.js_runtime.v8_isolate().exit();

0 commit comments

Comments
 (0)