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 410747 5c7c5f3952e82abfb4e5b25dad439a2197bf6621
parent 410746 42c1a8b6c89776a5030e030d23486a47ee22e50f
child 410748 48e28c61a9dc74c40c512ce4072d708880d39d31
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [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"));