From 6065abcb6bfcc28ad1995349b6f16f6752d0f051 Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Wed, 1 May 2024 15:05:46 +0530 Subject: script: Include layout when collecting memory reports (#32204) Signed-off-by: Mukilan Thiyagarajan --- components/script/script_thread.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'components/script') diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index f799aadbb01..93db23c6201 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -2556,6 +2556,13 @@ impl ScriptThread { let mut reports = vec![]; reports.extend(unsafe { get_reports(*self.get_cx(), path_seg) }); + SCRIPT_THREAD_ROOT.with(|root| { + let script_thread = unsafe { &*root.get().unwrap() }; + let layouts = script_thread.layouts.borrow(); + for layout in layouts.values() { + layout.collect_reports(&mut reports); + } + }); reports_chan.send(reports); } -- cgit v1.2.3