-
-
Save Trikolon/bf998eabc5efe8ded7d69e3d9ef266f8 to your computer and use it in GitHub Desktop.
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
# HG changeset patch | |
# User Paul Zuehlcke <pbz@mozilla.com> | |
# Date 1676375052 -3600 | |
# Tue Feb 14 12:44:12 2023 +0100 | |
# Node ID f9f9cdb9638775fb3f5f800faf2c75c860e717bd | |
# Parent f45ac8766b6167ecd4adc81490f8f9b927472200 | |
Bug 1816279 - Fix range being ignored for data clearing. r=Gijs! | |
diff --git a/browser/modules/Sanitizer.sys.mjs b/browser/modules/Sanitizer.sys.mjs | |
--- a/browser/modules/Sanitizer.sys.mjs | |
+++ b/browser/modules/Sanitizer.sys.mjs | |
@@ -810,22 +810,29 @@ async function sanitizeInternal(items, a | |
for (let name of itemsToClear) { | |
progress[name] = "blocking"; | |
let item = items[name]; | |
+ | |
+ let itemOptions = { | |
+ ...options, | |
+ progress: progress[name + "Progress"], | |
+ // Some cleaners use this field as a signal for shutdown clearing, only | |
+ // pass it if it's actually required by the cleaner. | |
+ principalsForShutdownClearing: item.shouldClearPerPrincipal( | |
+ progress.clearHonoringExceptions | |
+ ) | |
+ ? options.principalsForShutdownClearing | |
+ : undefined, | |
+ }; | |
try { | |
// Catch errors here, so later we can just loop through these. | |
handles.push({ | |
name, | |
- promise: item | |
- .clear( | |
- range, | |
- Object.assign(options, { progress: progress[name + "Progress"] }) | |
- ) | |
- .then( | |
- () => { | |
- progress[name] = "cleared"; | |
- delete progress[name + "Progress"]; | |
- }, | |
- ex => annotateError(name, ex) | |
- ), | |
+ promise: item.clear(range, itemOptions).then( | |
+ () => { | |
+ progress[name] = "cleared"; | |
+ delete progress[name + "Progress"]; | |
+ }, | |
+ ex => annotateError(name, ex) | |
+ ), | |
}); | |
} catch (ex) { | |
annotateError(name, ex); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment