Bug 1098055 - Enable deferred message protection for ContentParent. r=billm
authorJim Mathies <jmathies@mozilla.com>
Fri, 14 Nov 2014 19:22:44 -0600
changeset 240307 f25dd1871ad5af7dc0486e4fcaa86e47ff624523
parent 240306 6b6c5cce2ecf8542064dee829c1c8b6d98d5eccd
child 240308 b1d9d24148b0eac224c54bba70f4a12572326ee3
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1098055
milestone36.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 1098055 - Enable deferred message protection for ContentParent. r=billm
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1931,16 +1931,23 @@ ContentParent::ContentParent(mozIApplica
     } else if (aIsForPreallocated) {
         mAppManifestURL = MAGIC_PREALLOCATED_APP_MANIFEST_URL;
     }
 
     // From this point on, NS_WARNING, NS_ASSERTION, etc. should print out the
     // PID along with the warning.
     nsDebugImpl::SetMultiprocessMode("Parent");
 
+#if defined(XP_WIN) && !defined(MOZ_B2G)
+    // Request Windows message deferral behavior on our side of the PContent
+    // channel. Generally only applies to the situation where we get caught in
+    // a deadlock with the plugin process when sending CPOWs.
+    GetIPCChannel()->SetChannelFlags(MessageChannel::REQUIRE_DEFERRED_MESSAGE_PROTECTION);
+#endif
+
     NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
     ChildPrivileges privs = aIsNuwaProcess
         ? base::PRIVILEGES_INHERIT
         : base::PRIVILEGES_DEFAULT;
     mSubprocess = new GeckoChildProcessHost(GeckoProcessType_Content, privs);
 
     IToplevelProtocol::SetTransport(mSubprocess->GetChannel());