Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 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 crates/static-analysis-kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ thiserror = { workspace = true }
tree-sitter = { workspace = true }

# other
deno_core = "0.337.0"
deno_core = "0.341.0"
globset = "0.4.16"
graphviz-rust = "0.9.6"
sequence_trie = "0.3.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ impl V8ResourceWatchdog {
Arc::clone(&timeout_condvar),
);

let mut stats = v8::HeapStatistics::default();
isolate.get_heap_statistics(&mut stats);
let stats = isolate.get_heap_statistics();
let initial_heap_limit = stats.heap_size_limit();

let heap_limit_cb =
Expand Down Expand Up @@ -299,8 +298,7 @@ impl HeapLimitGuard {
let boxed_box = Box::new(near_heap_limit_cb);
let boxed_callback_ptr = Box::into_raw(boxed_box);
let isolate_ptr: *const v8::Isolate = &*isolate;
let mut stats = v8::HeapStatistics::default();
isolate.get_heap_statistics(&mut stats);
let stats = isolate.get_heap_statistics();
let initial_limit = stats.heap_size_limit();

let guard = Self {
Expand Down Expand Up @@ -462,8 +460,7 @@ pub(crate) mod tests {
/// Returns the percentage difference between the isolate's current heap limit
/// and the expected heap limit.
fn heap_limit_diff(isolate: &mut v8::Isolate, expected: usize) -> f32 {
let mut stats = v8::HeapStatistics::default();
isolate.get_heap_statistics(&mut stats);
let stats = isolate.get_heap_statistics();
let current_limit = stats.heap_size_limit() as isize;
let diff = current_limit.abs_diff(expected as isize);
diff as f32 / expected as f32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1579,12 +1579,11 @@ function visit(captures) {
#[test]
fn make_base_deno_core_runtime_set_heap_limit() {
const MAX_BYTES: usize = 16 * 1024 * 1024;
let mut heap_stats = v8::HeapStatistics::default();
let _v8 = cfg_test_v8();
for size in [MAX_BYTES, MAX_BYTES * 2] {
let mut rt = make_base_deno_core_runtime(vec![], Some(size));
rt.v8_isolate().get_heap_statistics(&mut heap_stats);
assert_eq!(heap_stats.heap_size_limit(), size);
let stats = rt.v8_isolate().get_heap_statistics();
assert_eq!(stats.heap_size_limit(), size);
}
}

Expand Down
Loading