Bug 1370237 - Always increment plugin epoch when creating nsPluginHost in parent; r=bsmedberg
authorKyle Machulis <kyle@nonpolynomial.com>
Tue, 06 Jun 2017 10:46:55 -0700
changeset 413105 5c7c5f3952e82abfb4e5b25dad439a2197bf6621
parent 413104 42c1a8b6c89776a5030e030d23486a47ee22e50f
child 413106 48e28c61a9dc74c40c512ce4072d708880d39d31
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1370237
milestone55.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 1370237 - Always increment plugin epoch when creating nsPluginHost in parent; r=bsmedberg If we don't increment the plugin epoch in the parent process before the first call to LoadPlugins, and all plugin info is already cached, the epochs will match and we'll never get a complete plugin list in the child. This patch makes sure our first parent/child epoch check never matches, so we always update correctly. MozReview-Commit-ID: Jj1F8m3aeGx
dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
@@ -296,16 +296,22 @@ nsPluginHost::nsPluginHost()
   PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("nsPluginHost::ctor\n"));
   PR_LogFlush();
 #endif
 
   // Load plugins on creation, as there's a good chance we'll need to send them
   // to content processes directly after creation.
   if (XRE_IsParentProcess())
   {
+    // Always increment the chrome epoch when we bring up the nsPluginHost in
+    // the parent process. If the only plugins we have are cached in
+    // pluginreg.dat, we won't see any plugin changes in LoadPlugins and the
+    // epoch will stay the same between the parent and child process, meaning
+    // plugins will never update in the child process.
+    IncrementChromeEpoch();
     LoadPlugins();
   }
 }
 
 nsPluginHost::~nsPluginHost()
 {
   PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("nsPluginHost::dtor\n"));