summaryrefslogtreecommitdiffstats
path: root/xpcom/base/CycleCollectedJSRuntime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/base/CycleCollectedJSRuntime.cpp')
-rw-r--r--xpcom/base/CycleCollectedJSRuntime.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/xpcom/base/CycleCollectedJSRuntime.cpp b/xpcom/base/CycleCollectedJSRuntime.cpp
index b6f6be5..839daf5 100644
--- a/xpcom/base/CycleCollectedJSRuntime.cpp
+++ b/xpcom/base/CycleCollectedJSRuntime.cpp
@@ -90,6 +90,10 @@
#include "ProfilerMarkerPayload.h"
#endif
+#if defined(XP_MACOSX)
+# include "nsMacUtilsImpl.h"
+#endif
+
#include "nsIException.h"
#include "nsIPlatformInfo.h"
#include "nsThread.h"
@@ -494,6 +498,12 @@ CycleCollectedJSRuntime::CycleCollectedJSRuntime(JSContext* aCx)
MOZ_ASSERT(aCx);
MOZ_ASSERT(mJSRuntime);
+#if defined(XP_MACOSX)
+ if (!XRE_IsParentProcess()) {
+ nsMacUtilsImpl::EnableTCSMIfAvailable();
+ }
+#endif
+
if (!JS_AddExtraGCRootsTracer(aCx, TraceBlackJS, this)) {
MOZ_CRASH("JS_AddExtraGCRootsTracer failed");
}