Bug 1647695 - Expose ChildID on frozen nsIHangReport;r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D83665
This commit is contained in:
David Teller 2020-08-03 17:34:53 +00:00
parent 7b6a5cb14a
commit d94647eccd
2 changed files with 12 additions and 0 deletions

View File

@ -1214,6 +1214,15 @@ HangMonitoredProcess::UserCanceled() {
return NS_OK;
}
NS_IMETHODIMP
HangMonitoredProcess::GetChildID(uint64_t* aChildID) {
if (!mContentParent) {
return NS_ERROR_NOT_AVAILABLE;
}
*aChildID = mContentParent->ChildID();
return NS_OK;
}
static bool InterruptCallback(JSContext* cx) {
if (HangMonitorChild* child = HangMonitorChild::Get()) {
return child->InterruptCallback();

View File

@ -40,6 +40,9 @@ interface nsIHangReport : nsISupports
// Only valid for PLUGIN_HANG reports.
readonly attribute ACString pluginName;
// The child id of the process in which the hang happened.
readonly attribute unsigned long long childID;
// Called by front end code when user ignores or cancels
// the notification.
void userCanceled();