Bug 1543173 - Turn off REQUIRE_DEFERRED_MESSAGE_PROTECTION in PluginModuleContentParent when native events are disabled. r=bobowen
authorJim Mathies <jmathies@mozilla.com>
Thu, 11 Apr 2019 07:40:57 +0000
changeset 469048 ad2edcb852488efc03b6f1b966a601c831c99d93
parent 469047 ef120e802c6f59c8e8d58c58659e857c888767d6
child 469049 09db4cf14fe84a96ea454347fa9310fd3caa9e7f
push id35856
push usercsabou@mozilla.com
push dateFri, 12 Apr 2019 03:19:48 +0000
treeherdermozilla-central@940684cd1065 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobowen
bugs1543173
milestone68.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 1543173 - Turn off REQUIRE_DEFERRED_MESSAGE_PROTECTION in PluginModuleContentParent when native events are disabled. r=bobowen Differential Revision: https://phabricator.services.mozilla.com/D26941
dom/plugins/ipc/PluginModuleParent.cpp
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -396,21 +396,23 @@ void PluginModuleContentParent::Initiali
   PluginModuleContentParent* parent = moduleMapping->GetModule();
   MOZ_ASSERT(parent);
 
   DebugOnly<bool> ok = aEndpoint.Bind(parent);
   MOZ_ASSERT(ok);
 
   moduleMapping->SetChannelOpened();
 
-  // Request Windows message deferral behavior on our channel. This
-  // applies to the top level and all sub plugin protocols since they
-  // all share the same channel.
-  parent->GetIPCChannel()->SetChannelFlags(
-      MessageChannel::REQUIRE_DEFERRED_MESSAGE_PROTECTION);
+  if (XRE_UseNativeEventProcessing()) {
+    // If we're processing native events in our message pump, request Windows
+    // message deferral behavior on our channel. This applies to the top level
+    // and all sub plugin protocols since they all share the same channel.
+    parent->GetIPCChannel()->SetChannelFlags(
+        MessageChannel::REQUIRE_DEFERRED_MESSAGE_PROTECTION);
+  }
 
   TimeoutChanged(kContentTimeoutPref, parent);
 
   // moduleMapping is linked into PluginModuleMapping::sModuleListHead and is
   // needed later, so since this function is returning successfully we
   // forget it here.
   moduleMapping.forget();
 }