Bug 1484250 - Fix redirection for CGSShutdownServerConnections on 10.10, r=alex_gaynor.
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 27 Aug 2018 07:41:41 -1000
changeset 488645 c6552a729ea7cca69c4ec87740cfc7393e52a597
parent 488644 bc1b51b050b02c474c44e27ad45fc52fc5873955
child 488659 417d94835a0334fb79cfa35b4216739d067783f2
push id9734
push usershindli@mozilla.com
push dateThu, 30 Aug 2018 12:18:07 +0000
treeherdermozilla-beta@71c71ab3afae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersalex_gaynor
bugs1484250
milestone63.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 1484250 - Fix redirection for CGSShutdownServerConnections on 10.10, r=alex_gaynor.
dom/ipc/ContentChild.cpp
toolkit/recordreplay/ProcessRedirectDarwin.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1639,21 +1639,18 @@ StartMacOSContentSandbox()
   int sandboxLevel = GetEffectiveContentSandboxLevel();
   if (sandboxLevel < 1) {
     return false;
   }
 
   // Close all current connections to the WindowServer. This 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.
-  if (!recordreplay::IsRecordingOrReplaying()) {
-    // Because of the WebReplay system for proxying system API calls, for the
-    // time being we skip this when running under WebReplay (bug 1482668).
-    CGSShutdownServerConnections();
-  }
+  CGSShutdownServerConnections();
+
   // Actual security benefits are only acheived when we additionally deny
   // future connections, however this currently breaks WebGL so it's not done
   // by default.
   if (Preferences::GetBool(
         "security.sandbox.content.mac.disconnect-windowserver")) {
     CGError result = CGSSetDenyWindowServerConnections(true);
     MOZ_DIAGNOSTIC_ASSERT(result == kCGErrorSuccess);
 #if !MOZ_DIAGNOSTIC_ASSERT_ENABLED
--- a/toolkit/recordreplay/ProcessRedirectDarwin.cpp
+++ b/toolkit/recordreplay/ProcessRedirectDarwin.cpp
@@ -316,16 +316,17 @@ namespace recordreplay {
   MACRO(CGPathAddPath)                          \
   MACRO(CGPathApply)                            \
   MACRO(CGPathContainsPoint)                    \
   MACRO(CGPathCreateMutable)                    \
   MACRO(CGPathGetBoundingBox)                   \
   MACRO(CGPathGetCurrentPoint)                  \
   MACRO(CGPathIsEmpty)                          \
   MACRO(CGSSetDebugOptions)                     \
+  MACRO(CGSShutdownServerConnections)           \
   MACRO(CTFontCopyFamilyName)                   \
   MACRO(CTFontCopyFontDescriptor)               \
   MACRO(CTFontCopyGraphicsFont)                 \
   MACRO(CTFontCopyTable)                        \
   MACRO(CTFontCopyVariationAxes)                \
   MACRO(CTFontCreateForString)                  \
   MACRO(CTFontCreatePathForGlyph)               \
   MACRO(CTFontCreateWithFontDescriptor)         \
@@ -2344,16 +2345,17 @@ RR_CTFontGetBoundingRectsForGlyphs(CTFon
     events.RecordOrReplayBytes(aRects, aCount * sizeof(CGRect));
   }
   return rval;
 }
 
 RRFunctionTypes1(CGPathGetCurrentPoint, CGPoint, CGPathRef)
 RRFunction1(CGPathIsEmpty)
 RRFunction1(CGSSetDebugOptions)
+RRFunctionVoid0(CGSShutdownServerConnections)
 RRFunction1(CTFontCopyFamilyName)
 RRFunction1(CTFontCopyFontDescriptor)
 RRFunction2(CTFontCopyGraphicsFont)
 RRFunction3(CTFontCopyTable)
 RRFunction1(CTFontCopyVariationAxes)
 RRFunctionTypes3(CTFontCreateForString, CTFontRef,
                  CTFontRef, CFStringRef, CFRange)
 RRFunction3(CTFontCreatePathForGlyph)