Skip to content

Commit 395f612

Browse files
bartlomiejuclaude
andcommitted
fix: remove overly strict assertion in heap_code_statistics test
code_and_metadata_size may be 0 on a fresh isolate before any JS is compiled, depending on the platform and V8 version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 31352ff commit 395f612

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_api.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7803,9 +7803,8 @@ fn heap_code_statistics() {
78037803
.get_heap_code_and_metadata_statistics()
78047804
.expect("get_heap_code_and_metadata_statistics should succeed");
78057805

7806-
// After creating an isolate, there should be some code already compiled.
7807-
assert!(s.code_and_metadata_size() > 0);
7808-
// Bytecode may or may not be present at this point.
7806+
// Before running any code, code_and_metadata_size may or may not be > 0
7807+
// depending on the platform and V8 version.
78097808
// external_script_source_size and cpu_profiler_metadata_size start at 0.
78107809
assert_eq!(s.external_script_source_size(), 0);
78117810
assert_eq!(s.cpu_profiler_metadata_size(), 0);

0 commit comments

Comments
 (0)