-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14826 from brave/pr14814_maxk-fix-profile-destroy…
…er-crash_1.44.x [Cr105 follow up] Fixes crash in ProfileDestroyer. (uplift to 1.44.x)
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Copyright (c) 2022 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "chrome/browser/profiles/profile_destroyer.h" | ||
|
||
// When there are multiple OTR profiles, such as with a Private window and a Tor | ||
// window open, it doesn't make sense that when destroying one of the OTR | ||
// profiles the Chromium code wants to check that hosts for all OTR profiles are | ||
// gone. | ||
#define BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE \ | ||
if (!profile->IsOffTheRecord()) | ||
|
||
#include "src/chrome/browser/profiles/profile_destroyer.cc" | ||
#undef BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE |
12 changes: 12 additions & 0 deletions
12
patches/chrome-browser-profiles-profile_destroyer.cc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/chrome/browser/profiles/profile_destroyer.cc b/chrome/browser/profiles/profile_destroyer.cc | ||
index 517fd2a8a924f3076ad14105a0ec2677e18b0c79..1abc39094e3ffa59725dbeec543eac4371b81d18 100644 | ||
--- a/chrome/browser/profiles/profile_destroyer.cc | ||
+++ b/chrome/browser/profiles/profile_destroyer.cc | ||
@@ -88,6 +88,7 @@ void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) { | ||
// ignored during shutdown and by the System Profile do not either. | ||
HostSet profile_hosts; | ||
GetHostsForProfile(&profile_hosts, profile); | ||
+ BRAVE_PROFILE_DESTROYER_DESTROY_PROFILE_WHEN_APPROPRIATE | ||
for (Profile* otr_profile : profile->GetAllOffTheRecordProfiles()) { | ||
GetHostsForProfile(&profile_hosts, otr_profile); | ||
} |