Bug 1541344 - Delete plugin-data only for the sites with data. r=gsvelto, a=RyanVM
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 14 Aug 2019 22:11:09 +0000
changeset 545170 26469ee275619eb3ee13dc37aae505d2de68d89d
parent 545169 ae6de9d94b5f9ed242dbb4418438fd8871a23851
child 545171 d047e1dbad3b2f30eab8154c76150e0f7e18c580
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto, RyanVM
bugs1541344
milestone69.0
Bug 1541344 - Delete plugin-data only for the sites with data. r=gsvelto, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D40644
toolkit/components/cleardata/ClearDataService.jsm
--- a/toolkit/components/cleardata/ClearDataService.jsm
+++ b/toolkit/components/cleardata/ClearDataService.jsm
@@ -285,17 +285,19 @@ const PluginDataCleaner = {
   },
 
   _deleteInternal(aCb) {
     let ph = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
 
     let promises = [];
     let tags = ph.getPluginTags();
     for (let tag of tags) {
-      promises.push(aCb(ph, tag));
+      if (tag.loaded) {
+        promises.push(aCb(ph, tag));
+      }
     }
 
     // As evidenced in bug 1253204, clearing plugin data can sometimes be
     // very, very long, for mysterious reasons. Unfortunately, this is not
     // something actionable by Mozilla, so crashing here serves no purpose.
     //
     // For this reason, instead of waiting for sanitization to always
     // complete, we introduce a soft timeout. Once this timeout has