summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx-for-objc.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-08-22 10:48:29 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-08-22 10:48:29 -0400
commit7dc014474de0c2d83a3cd314acd9dc0882622299 (patch)
tree9f72ece0fde5764a41733d6853992dc0196bce78 /indra/newview/llappviewermacosx-for-objc.h
parent302052700b4605605808b90bed8fb1c5a93ece22 (diff)
DRTVWR-447: Attempt to post BugSplat metadata with Mac crash reports.
Introduce CrashMetadata, an LLSingleton in llappviewermacosx.cpp, declared in llappviewermacosx-for-objc.h and accessed by the various BugsplatStartupManagerDelegate override methods. CrashMetadata is populated by reading the previous (presumably crashed) run's static_debug_info.log file. This replaces the previous getOldLogFilePathname(), getFatalMessage() and getAgentFullname() functions. To extend that suite for additional metadata, not only would we have to keep adding new free functions, but we'd have to keep rereading the static_debug_info.log file. Override the new applicationKeyForBugsplatStartupManager, defaultUserNameForBugsplatStartupManager, defaultUserEmailForBugsplatStartupManager methods to extract relevant fields from CrashMetadata. Change applicationLogForBugsplatStartupManager and attachmentForBugsplatStartupManager to do the same. Enhance llviewerregion.cpp to update the static_debug_info.log file every time we enter a new region.
Diffstat (limited to 'indra/newview/llappviewermacosx-for-objc.h')
-rw-r--r--indra/newview/llappviewermacosx-for-objc.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llappviewermacosx-for-objc.h b/indra/newview/llappviewermacosx-for-objc.h
index ac85d7e8c3..79da453cbe 100644
--- a/indra/newview/llappviewermacosx-for-objc.h
+++ b/indra/newview/llappviewermacosx-for-objc.h
@@ -29,9 +29,24 @@ void handleUrl(const char* url_utf8);
bool pumpMainLoop();
void handleQuit();
void cleanupViewer();
-std::string getOldLogFilePathname();
-std::string getFatalMessage();
-std::string getAgentFullname();
void infos(const std::string& message);
+// This struct is malleable; it only serves as a way to convey a number of
+// fields from llappviewermacosx.cpp's CrashMetadata_instance() function to the
+// consuming functions in llappdelegate-objc.mm. As long as both those sources
+// are compiled with this same header, the content and order of CrashMetadata
+// can change as needed.
+struct CrashMetadata
+{
+ std::string logFilePathname;
+ std::string userSettingsPathname;
+ std::string staticDebugPathname;
+ std::string OSInfo;
+ std::string agentFullname;
+ std::string regionName;
+ std::string fatalMessage;
+};
+
+CrashMetadata& CrashMetadata_instance();
+
#endif /* ! defined(LL_LLAPPVIEWERMACOSX_FOR_OBJC_H) */