Bug 1348273 - Convert the network-related annotations; r?mcmanus
MozReview-Commit-ID: FG1RRjC1lZR
--- a/netwerk/ipc/NeckoMessageUtils.h
+++ b/netwerk/ipc/NeckoMessageUtils.h
@@ -97,17 +97,18 @@ struct ParamTraits<mozilla::net::NetAddr
// Train's already off the rails: let's get a stack trace at least...
MOZ_CRASH("Error: please post stack trace to "
"https://bugzilla.mozilla.org/show_bug.cgi?id=661158");
aMsg->WriteBytes(aParam.local.path, sizeof(aParam.local.path));
#endif
} else {
if (XRE_IsParentProcess()) {
nsPrintfCString msg("%d", aParam.raw.family);
- CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("Unknown NetAddr socket family"), msg);
+ CrashReporter::AnnotateCrashReport(
+ CrashReporter::Annotation::UnknownNetAddrSocketFamily, msg);
}
MOZ_CRASH("Unknown socket family");
}
}
static bool Read(const Message* aMsg, PickleIterator* aIter, mozilla::net::NetAddr* aResult)
{
--- a/toolkit/crashreporter/CrashAnnotations.yaml
+++ b/toolkit/crashreporter/CrashAnnotations.yaml
@@ -585,16 +585,22 @@ TotalPhysicalMemory:
TotalVirtualMemory:
description: >
Windows-only, size of the virtual address space. This annotation is
populated with the contents of the MEMORYSTATUSEX's structure
ullTotalVirtual field.
type: string
ping: true
+UnknownNetAddrSocketFamily:
+ description: >
+ An unknown network address family was requested to Necko. The value is the
+ requested family number.
+ type: integer
+
UnmarshalActCtx:
description: >
Proxy stream unmarshalling current activation context.
type: string
UnmarshalActCtxManifestPath:
description: >
Proxy stream unmarshalling current activation context manifest path.
@@ -613,8 +619,13 @@ URL:
type: string
content: false
User32BeforeBlocklist:
description: >
Set to 1 if user32.dll was loaded before we could install the DLL blocklist.
type: boolean
ping: true
+
+Winsock_LSP:
+ description: >
+ Information on winsock LSPs injected in our networking stack.
+ type: string
--- a/widget/windows/LSPAnnotator.cpp
+++ b/widget/windows/LSPAnnotator.cpp
@@ -39,17 +39,18 @@ public:
void
LSPAnnotationGatherer::Annotate()
{
nsCOMPtr<nsICrashReporter> cr =
do_GetService("@mozilla.org/toolkit/crash-reporter;1");
bool enabled;
if (cr && NS_SUCCEEDED(cr->GetEnabled(&enabled)) && enabled) {
- cr->AnnotateCrashReport(NS_LITERAL_CSTRING("Winsock_LSP"), mString);
+ cr->AnnotateCrashReport(
+ static_cast<uint32_t>(CrashReporter::Annotation::Winsock_LSP), mString);
}
mThread->AsyncShutdown();
}
NS_IMETHODIMP
LSPAnnotationGatherer::Run()
{
NS_SetCurrentThreadName("LSP Annotator");