mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1124933 - Add a generic api for annotating KillHard calls. r=billm
This commit is contained in:
parent
9ffb3a022f
commit
78b2097606
@ -3013,6 +3013,11 @@ ContentParent::Observe(nsISupports* aSubject,
|
||||
if (!result.IsEmpty()) {
|
||||
pse->AddSubProfile(result.get());
|
||||
}
|
||||
if (IsKillHardAnnotationSet()) {
|
||||
crashReporter->AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("kill_hard"),
|
||||
GetKillHardAnnotation());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -240,6 +240,16 @@ public:
|
||||
*/
|
||||
void KillHard();
|
||||
|
||||
/**
|
||||
* API for adding a crash reporter annotation that provides a reason
|
||||
* for a listener request to abort the child.
|
||||
*/
|
||||
bool IsKillHardAnnotationSet() { return mKillHardAnnotation.IsEmpty(); }
|
||||
const nsCString& GetKillHardAnnotation() { return mKillHardAnnotation; }
|
||||
void SetKillHardAnnotation(const nsACString& aReason) {
|
||||
mKillHardAnnotation = aReason;
|
||||
}
|
||||
|
||||
ContentParentId ChildID() MOZ_OVERRIDE { return mChildID; }
|
||||
const nsString& AppManifestURL() const { return mAppManifestURL; }
|
||||
|
||||
@ -794,6 +804,8 @@ private:
|
||||
|
||||
nsString mAppManifestURL;
|
||||
|
||||
nsCString mKillHardAnnotation;
|
||||
|
||||
/**
|
||||
* We cache mAppName instead of looking it up using mAppManifestURL when we
|
||||
* need it because it turns out that getting an app from the apps service is
|
||||
|
Loading…
Reference in New Issue
Block a user