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
--- 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();