Bug 1480992 - move function call into diagnostic assert to prevent complains about variable not used in release opt builds. r?Alex_Gaynor draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 04 Aug 2018 23:12:25 +0300
changeset 826637 a39d9a45b31efef4f698e828e7f41e4364455697
parent 826605 4146a5857135b8542858b9e23bc5a71237e05f49
push id118380
push userbmo:aryx.bugmail@gmx-topmail.de
push dateSat, 04 Aug 2018 21:07:23 +0000
reviewersAlex_Gaynor
bugs1480992
milestone63.0a1
Bug 1480992 - move function call into diagnostic assert to prevent complains about variable not used in release opt builds. r?Alex_Gaynor MozReview-Commit-ID: GhwhnB3Fh3E
dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1634,18 +1634,19 @@ StartMacOSContentSandbox()
 
   if (Preferences::GetBool(
         "security.sandbox.content.mac.disconnect-windowserver")) {
     // If we've opened a connection to the window server, shut it down now. Forbid
     // future connections as well. We do this for sandboxing, but it also ensures
     // that the Activity Monitor will not label the content process as "Not
     // responding" because it's not running a native event loop. See bug 1384336.
     CGSShutdownServerConnections();
-    CGError result = CGSSetDenyWindowServerConnections(true);
-    MOZ_DIAGNOSTIC_ASSERT(result == kCGErrorSuccess);
+    MOZ_DIAGNOSTIC_ASSERT(
+      CGSSetDenyWindowServerConnections(true) == kCGErrorSuccess
+    );
   }
 
   nsAutoCString appPath, appBinaryPath, appDir;
   if (!GetAppPaths(appPath, appBinaryPath, appDir)) {
     MOZ_CRASH("Error resolving child process path");
   }
 
   ContentChild* cc = ContentChild::GetSingleton();