From d4452929a28b9b3d67cac69da032336201ce8824 Mon Sep 17 00:00:00 2001 From: brave-builds Date: Tue, 29 Oct 2024 13:03:13 +0000 Subject: [PATCH] Uplift of #26246 (squashed) to release --- ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift b/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift index 6051d420c9ef..62902a5108e3 100644 --- a/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift +++ b/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift @@ -843,6 +843,10 @@ class TabManager: NSObject { // Remove all unwanted tabs for tab in allTabs { guard tab.url?.baseDomain == etldP1 else { continue } + // The Tab's WebView is not deinitialized immediately, so it's possible the + // WebView still stores data after we shred but before the WebView is deinitialized. + // Delete the web view to prevent data being stored after data is Shred. + tab.deleteWebView() removeTab(tab) }