summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-08 05:06:21 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-06-08 05:06:21 +0300
commit0a745b47880fb16b1db8cd3327377a383dbfe6a8 (patch)
treee96e11b0083858ce6f70d67f3ea818c13bc43b29 /indra/newview/llappviewermacosx.cpp
parent4cec2d689f9a7d1791f7ea3933cc1cdc59e972ab (diff)
Revert "Merge branch 'DRTVWR-520-apple-notarization' into DRTVWR-540-maint"
This reverts commit 681298dd726b2d00910fe71646147fadd1aba980, reversing changes made to 323f41f4892248762fc8505d8df17d70bd833cf3.
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 862e2b45df..662164af2d 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -240,7 +240,17 @@ LLAppViewerMacOSX::~LLAppViewerMacOSX()
bool LLAppViewerMacOSX::init()
{
- return LLAppViewer::init();
+ bool success = LLAppViewer::init();
+
+#if LL_SEND_CRASH_REPORTS
+ if (success)
+ {
+ LLAppViewer* pApp = LLAppViewer::instance();
+ pApp->initCrashReporting();
+ }
+#endif
+
+ return success;
}
// MacOSX may add and addition command line arguement for the process serial number.
@@ -357,6 +367,21 @@ bool LLAppViewerMacOSX::restoreErrorTrap()
return reset_count == 0;
}
+void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
+{
+ std::string command_str = "mac-crash-logger.app";
+
+ std::stringstream pid_str;
+ pid_str << LLApp::getPid();
+ std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
+ std::string appname = gDirUtilp->getExecutableFilename();
+ std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() };
+ std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) );
+ LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str()
+ << " " << logdir << " " << appname << LL_ENDL;
+ launchApplication(&command_str, &args);
+}
+
std::string LLAppViewerMacOSX::generateSerialNumber()
{
char serial_md5[MD5HEX_STR_SIZE]; // Flawfinder: ignore