Commit 48e52df9 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

PM: More testing for V8PerFrameMemoryDecorator.

Bug: 1080672
Change-Id: I2e7bc7428ff0448844517862751ced5cc250d902
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204438
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Reviewed-by: default avatarJoe Mason <joenotcharles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772001}
parent ae1b9205
......@@ -227,6 +227,20 @@ uint64_t V8PerFrameMemoryDecorator::GetUnassociatedBytesForTesting(
return process_data->unassociated_v8_bytes_used();
}
uint64_t V8PerFrameMemoryDecorator::GetAssociatedBytesForTesting(
const FrameNode* frame_node) {
FrameData* frame_data = FrameData::Get(frame_node);
if (!frame_data)
return 0u;
return frame_data->v8_bytes_used();
}
bool V8PerFrameMemoryDecorator::HasAssociatedBytesForTesting(
const FrameNode* frame_node) {
return FrameData::Get(frame_node);
}
void V8PerFrameMemoryDecorator::BindReceiverWithProxyHost(
mojo::PendingReceiver<performance_manager::mojom::V8PerFrameMemoryReporter>
pending_receiver,
......
......@@ -43,6 +43,8 @@ class V8PerFrameMemoryDecorator : public GraphOwned,
}
uint64_t GetUnassociatedBytesForTesting(const ProcessNode* process_node);
uint64_t GetAssociatedBytesForTesting(const FrameNode* frame_node);
bool HasAssociatedBytesForTesting(const FrameNode* frame_node);
private:
class ProcessData;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment