Skip to content

Commit dfa7e3f

Browse files
mlippautzCommit Bot
authored andcommitted
[api] GetHeapStatistics: Only report backing stores as external memory
Whether backing stores are on V8's heap or not is opaque to JavaScript. This is not true for other external memory such as DOM which is why only backingstores are considered as on heap. Bug: chromium:914304 Change-Id: Idfeb9815daeee239a6a5b95077421e555bfe5fda Reviewed-on: https://chromium-review.googlesource.com/c/1454726 Reviewed-by: Ulan Degenbaev <[email protected]> Commit-Queue: Michael Lippautz <[email protected]> Cr-Commit-Position: refs/heads/master@{#59389}
1 parent f71dd20 commit dfa7e3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8405,7 +8405,7 @@ void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
84058405
heap_statistics->malloced_memory_ =
84068406
isolate->allocator()->GetCurrentMemoryUsage() +
84078407
isolate->wasm_engine()->allocator()->GetCurrentMemoryUsage();
8408-
heap_statistics->external_memory_ = isolate->heap()->external_memory();
8408+
heap_statistics->external_memory_ = isolate->heap()->backing_store_bytes();
84098409
heap_statistics->peak_malloced_memory_ =
84108410
isolate->allocator()->GetMaxMemoryUsage() +
84118411
isolate->wasm_engine()->allocator()->GetMaxMemoryUsage();

0 commit comments

Comments
 (0)