Bug 1541344 - Delete plugin-data only for the sites with data,r=gsvelto
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 14 Aug 2019 22:11:09 +0000
changeset 488222 225c129a3f3e318b3ae1c550342193407be0376a
parent 488221 abe2c2a4e6f66154d3d5a4ce68cb94cfa1d0f32d
child 488223 f896f31915a4ab71706877194697f4f95acf40a1
push id113904
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:41:00 +0000
treeherdermozilla-inbound@b283a7ef186c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto
bugs1541344
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1541344 - Delete plugin-data only for the sites with data,r=gsvelto 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